api.go 121 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508
  1. // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
  2. package shield
  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 opAssociateDRTLogBucket = "AssociateDRTLogBucket"
  13. // AssociateDRTLogBucketRequest generates a "aws/request.Request" representing the
  14. // client's request for the AssociateDRTLogBucket 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 AssociateDRTLogBucket for more information on using the AssociateDRTLogBucket
  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 AssociateDRTLogBucketRequest method.
  29. // req, resp := client.AssociateDRTLogBucketRequest(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/shield-2016-06-02/AssociateDRTLogBucket
  37. func (c *Shield) AssociateDRTLogBucketRequest(input *AssociateDRTLogBucketInput) (req *request.Request, output *AssociateDRTLogBucketOutput) {
  38. op := &request.Operation{
  39. Name: opAssociateDRTLogBucket,
  40. HTTPMethod: "POST",
  41. HTTPPath: "/",
  42. }
  43. if input == nil {
  44. input = &AssociateDRTLogBucketInput{}
  45. }
  46. output = &AssociateDRTLogBucketOutput{}
  47. req = c.newRequest(op, input, output)
  48. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  49. return
  50. }
  51. // AssociateDRTLogBucket API operation for AWS Shield.
  52. //
  53. // Authorizes the DDoS Response team (DRT) to access the specified Amazon S3
  54. // bucket containing your flow logs. You can associate up to 10 Amazon S3 buckets
  55. // with your subscription.
  56. //
  57. // To use the services of the DRT and make an AssociateDRTLogBucket request,
  58. // you must be subscribed to the Business Support plan (https://aws.amazon.com/premiumsupport/business-support/)
  59. // or the Enterprise Support plan (https://aws.amazon.com/premiumsupport/enterprise-support/).
  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 AWS Shield's
  66. // API operation AssociateDRTLogBucket for usage and error information.
  67. //
  68. // Returned Error Codes:
  69. // * ErrCodeInternalErrorException "InternalErrorException"
  70. // Exception that indicates that a problem occurred with the service infrastructure.
  71. // You can retry the request.
  72. //
  73. // * ErrCodeInvalidOperationException "InvalidOperationException"
  74. // Exception that indicates that the operation would not cause any change to
  75. // occur.
  76. //
  77. // * ErrCodeNoAssociatedRoleException "NoAssociatedRoleException"
  78. // The ARN of the role that you specifed does not exist.
  79. //
  80. // * ErrCodeLimitsExceededException "LimitsExceededException"
  81. // Exception that indicates that the operation would exceed a limit.
  82. //
  83. // Type is the type of limit that would be exceeded.
  84. //
  85. // Limit is the threshold that would be exceeded.
  86. //
  87. // * ErrCodeInvalidParameterException "InvalidParameterException"
  88. // Exception that indicates that the parameters passed to the API are invalid.
  89. //
  90. // * ErrCodeAccessDeniedForDependencyException "AccessDeniedForDependencyException"
  91. // In order to grant the necessary access to the DDoS Response Team, the user
  92. // submitting AssociateDRTRole must have the iam:PassRole permission. This error
  93. // indicates the user did not have the appropriate permissions. For more information,
  94. // see Granting a User Permissions to Pass a Role to an AWS Service (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_passrole.html).
  95. //
  96. // * ErrCodeOptimisticLockException "OptimisticLockException"
  97. // Exception that indicates that the protection state has been modified by another
  98. // client. You can retry the request.
  99. //
  100. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  101. // Exception indicating the specified resource does not exist.
  102. //
  103. // See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/AssociateDRTLogBucket
  104. func (c *Shield) AssociateDRTLogBucket(input *AssociateDRTLogBucketInput) (*AssociateDRTLogBucketOutput, error) {
  105. req, out := c.AssociateDRTLogBucketRequest(input)
  106. return out, req.Send()
  107. }
  108. // AssociateDRTLogBucketWithContext is the same as AssociateDRTLogBucket with the addition of
  109. // the ability to pass a context and additional request options.
  110. //
  111. // See AssociateDRTLogBucket for details on how to use this API operation.
  112. //
  113. // The context must be non-nil and will be used for request cancellation. If
  114. // the context is nil a panic will occur. In the future the SDK may create
  115. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  116. // for more information on using Contexts.
  117. func (c *Shield) AssociateDRTLogBucketWithContext(ctx aws.Context, input *AssociateDRTLogBucketInput, opts ...request.Option) (*AssociateDRTLogBucketOutput, error) {
  118. req, out := c.AssociateDRTLogBucketRequest(input)
  119. req.SetContext(ctx)
  120. req.ApplyOptions(opts...)
  121. return out, req.Send()
  122. }
  123. const opAssociateDRTRole = "AssociateDRTRole"
  124. // AssociateDRTRoleRequest generates a "aws/request.Request" representing the
  125. // client's request for the AssociateDRTRole operation. The "output" return
  126. // value will be populated with the request's response once the request completes
  127. // successfully.
  128. //
  129. // Use "Send" method on the returned Request to send the API call to the service.
  130. // the "output" return value is not valid until after Send returns without error.
  131. //
  132. // See AssociateDRTRole for more information on using the AssociateDRTRole
  133. // API call, and error handling.
  134. //
  135. // This method is useful when you want to inject custom logic or configuration
  136. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  137. //
  138. //
  139. // // Example sending a request using the AssociateDRTRoleRequest method.
  140. // req, resp := client.AssociateDRTRoleRequest(params)
  141. //
  142. // err := req.Send()
  143. // if err == nil { // resp is now filled
  144. // fmt.Println(resp)
  145. // }
  146. //
  147. // See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/AssociateDRTRole
  148. func (c *Shield) AssociateDRTRoleRequest(input *AssociateDRTRoleInput) (req *request.Request, output *AssociateDRTRoleOutput) {
  149. op := &request.Operation{
  150. Name: opAssociateDRTRole,
  151. HTTPMethod: "POST",
  152. HTTPPath: "/",
  153. }
  154. if input == nil {
  155. input = &AssociateDRTRoleInput{}
  156. }
  157. output = &AssociateDRTRoleOutput{}
  158. req = c.newRequest(op, input, output)
  159. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  160. return
  161. }
  162. // AssociateDRTRole API operation for AWS Shield.
  163. //
  164. // Authorizes the DDoS Response team (DRT), using the specified role, to access
  165. // your AWS account to assist with DDoS attack mitigation during potential attacks.
  166. // This enables the DRT to inspect your AWS WAF configuration and create or
  167. // update AWS WAF rules and web ACLs.
  168. //
  169. // You can associate only one RoleArn with your subscription. If you submit
  170. // an AssociateDRTRole request for an account that already has an associated
  171. // role, the new RoleArn will replace the existing RoleArn.
  172. //
  173. // Prior to making the AssociateDRTRole request, you must attach the AWSShieldDRTAccessPolicy
  174. // (https://console.aws.amazon.com/iam/home?#/policies/arn:aws:iam::aws:policy/service-role/AWSShieldDRTAccessPolicy)
  175. // managed policy to the role you will specify in the request. For more information
  176. // see Attaching and Detaching IAM Policies ( https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_manage-attach-detach.html).
  177. // The role must also trust the service principal drt.shield.amazonaws.com.
  178. // For more information, see IAM JSON Policy Elements: Principal (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html).
  179. //
  180. // The DRT will have access only to your AWS WAF and Shield resources. By submitting
  181. // this request, you authorize the DRT to inspect your AWS WAF and Shield configuration
  182. // and create and update AWS WAF rules and web ACLs on your behalf. The DRT
  183. // takes these actions only if explicitly authorized by you.
  184. //
  185. // You must have the iam:PassRole permission to make an AssociateDRTRole request.
  186. // For more information, see Granting a User Permissions to Pass a Role to an
  187. // AWS Service (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_passrole.html).
  188. //
  189. // To use the services of the DRT and make an AssociateDRTRole request, you
  190. // must be subscribed to the Business Support plan (https://aws.amazon.com/premiumsupport/business-support/)
  191. // or the Enterprise Support plan (https://aws.amazon.com/premiumsupport/enterprise-support/).
  192. //
  193. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  194. // with awserr.Error's Code and Message methods to get detailed information about
  195. // the error.
  196. //
  197. // See the AWS API reference guide for AWS Shield's
  198. // API operation AssociateDRTRole for usage and error information.
  199. //
  200. // Returned Error Codes:
  201. // * ErrCodeInternalErrorException "InternalErrorException"
  202. // Exception that indicates that a problem occurred with the service infrastructure.
  203. // You can retry the request.
  204. //
  205. // * ErrCodeInvalidOperationException "InvalidOperationException"
  206. // Exception that indicates that the operation would not cause any change to
  207. // occur.
  208. //
  209. // * ErrCodeInvalidParameterException "InvalidParameterException"
  210. // Exception that indicates that the parameters passed to the API are invalid.
  211. //
  212. // * ErrCodeAccessDeniedForDependencyException "AccessDeniedForDependencyException"
  213. // In order to grant the necessary access to the DDoS Response Team, the user
  214. // submitting AssociateDRTRole must have the iam:PassRole permission. This error
  215. // indicates the user did not have the appropriate permissions. For more information,
  216. // see Granting a User Permissions to Pass a Role to an AWS Service (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_passrole.html).
  217. //
  218. // * ErrCodeOptimisticLockException "OptimisticLockException"
  219. // Exception that indicates that the protection state has been modified by another
  220. // client. You can retry the request.
  221. //
  222. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  223. // Exception indicating the specified resource does not exist.
  224. //
  225. // See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/AssociateDRTRole
  226. func (c *Shield) AssociateDRTRole(input *AssociateDRTRoleInput) (*AssociateDRTRoleOutput, error) {
  227. req, out := c.AssociateDRTRoleRequest(input)
  228. return out, req.Send()
  229. }
  230. // AssociateDRTRoleWithContext is the same as AssociateDRTRole with the addition of
  231. // the ability to pass a context and additional request options.
  232. //
  233. // See AssociateDRTRole for details on how to use this API operation.
  234. //
  235. // The context must be non-nil and will be used for request cancellation. If
  236. // the context is nil a panic will occur. In the future the SDK may create
  237. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  238. // for more information on using Contexts.
  239. func (c *Shield) AssociateDRTRoleWithContext(ctx aws.Context, input *AssociateDRTRoleInput, opts ...request.Option) (*AssociateDRTRoleOutput, error) {
  240. req, out := c.AssociateDRTRoleRequest(input)
  241. req.SetContext(ctx)
  242. req.ApplyOptions(opts...)
  243. return out, req.Send()
  244. }
  245. const opCreateProtection = "CreateProtection"
  246. // CreateProtectionRequest generates a "aws/request.Request" representing the
  247. // client's request for the CreateProtection operation. The "output" return
  248. // value will be populated with the request's response once the request completes
  249. // successfully.
  250. //
  251. // Use "Send" method on the returned Request to send the API call to the service.
  252. // the "output" return value is not valid until after Send returns without error.
  253. //
  254. // See CreateProtection for more information on using the CreateProtection
  255. // API call, and error handling.
  256. //
  257. // This method is useful when you want to inject custom logic or configuration
  258. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  259. //
  260. //
  261. // // Example sending a request using the CreateProtectionRequest method.
  262. // req, resp := client.CreateProtectionRequest(params)
  263. //
  264. // err := req.Send()
  265. // if err == nil { // resp is now filled
  266. // fmt.Println(resp)
  267. // }
  268. //
  269. // See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/CreateProtection
  270. func (c *Shield) CreateProtectionRequest(input *CreateProtectionInput) (req *request.Request, output *CreateProtectionOutput) {
  271. op := &request.Operation{
  272. Name: opCreateProtection,
  273. HTTPMethod: "POST",
  274. HTTPPath: "/",
  275. }
  276. if input == nil {
  277. input = &CreateProtectionInput{}
  278. }
  279. output = &CreateProtectionOutput{}
  280. req = c.newRequest(op, input, output)
  281. return
  282. }
  283. // CreateProtection API operation for AWS Shield.
  284. //
  285. // Enables AWS Shield Advanced for a specific AWS resource. The resource can
  286. // be an Amazon CloudFront distribution, Elastic Load Balancing load balancer,
  287. // Elastic IP Address, or an Amazon Route 53 hosted zone.
  288. //
  289. // You can add protection to only a single resource with each CreateProtection
  290. // request. If you want to add protection to multiple resources at once, use
  291. // the AWS WAF console (https://console.aws.amazon.com/waf/). For more information
  292. // see Getting Started with AWS Shield Advanced (https://docs.aws.amazon.com/waf/latest/developerguide/getting-started-ddos.html)
  293. // and Add AWS Shield Advanced Protection to more AWS Resources (https://docs.aws.amazon.com/waf/latest/developerguide/configure-new-protection.html).
  294. //
  295. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  296. // with awserr.Error's Code and Message methods to get detailed information about
  297. // the error.
  298. //
  299. // See the AWS API reference guide for AWS Shield's
  300. // API operation CreateProtection for usage and error information.
  301. //
  302. // Returned Error Codes:
  303. // * ErrCodeInternalErrorException "InternalErrorException"
  304. // Exception that indicates that a problem occurred with the service infrastructure.
  305. // You can retry the request.
  306. //
  307. // * ErrCodeInvalidResourceException "InvalidResourceException"
  308. // Exception that indicates that the resource is invalid. You might not have
  309. // access to the resource, or the resource might not exist.
  310. //
  311. // * ErrCodeInvalidOperationException "InvalidOperationException"
  312. // Exception that indicates that the operation would not cause any change to
  313. // occur.
  314. //
  315. // * ErrCodeLimitsExceededException "LimitsExceededException"
  316. // Exception that indicates that the operation would exceed a limit.
  317. //
  318. // Type is the type of limit that would be exceeded.
  319. //
  320. // Limit is the threshold that would be exceeded.
  321. //
  322. // * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException"
  323. // Exception indicating the specified resource already exists.
  324. //
  325. // * ErrCodeOptimisticLockException "OptimisticLockException"
  326. // Exception that indicates that the protection state has been modified by another
  327. // client. You can retry the request.
  328. //
  329. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  330. // Exception indicating the specified resource does not exist.
  331. //
  332. // See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/CreateProtection
  333. func (c *Shield) CreateProtection(input *CreateProtectionInput) (*CreateProtectionOutput, error) {
  334. req, out := c.CreateProtectionRequest(input)
  335. return out, req.Send()
  336. }
  337. // CreateProtectionWithContext is the same as CreateProtection with the addition of
  338. // the ability to pass a context and additional request options.
  339. //
  340. // See CreateProtection for details on how to use this API operation.
  341. //
  342. // The context must be non-nil and will be used for request cancellation. If
  343. // the context is nil a panic will occur. In the future the SDK may create
  344. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  345. // for more information on using Contexts.
  346. func (c *Shield) CreateProtectionWithContext(ctx aws.Context, input *CreateProtectionInput, opts ...request.Option) (*CreateProtectionOutput, error) {
  347. req, out := c.CreateProtectionRequest(input)
  348. req.SetContext(ctx)
  349. req.ApplyOptions(opts...)
  350. return out, req.Send()
  351. }
  352. const opCreateSubscription = "CreateSubscription"
  353. // CreateSubscriptionRequest generates a "aws/request.Request" representing the
  354. // client's request for the CreateSubscription operation. The "output" return
  355. // value will be populated with the request's response once the request completes
  356. // successfully.
  357. //
  358. // Use "Send" method on the returned Request to send the API call to the service.
  359. // the "output" return value is not valid until after Send returns without error.
  360. //
  361. // See CreateSubscription for more information on using the CreateSubscription
  362. // API call, and error handling.
  363. //
  364. // This method is useful when you want to inject custom logic or configuration
  365. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  366. //
  367. //
  368. // // Example sending a request using the CreateSubscriptionRequest method.
  369. // req, resp := client.CreateSubscriptionRequest(params)
  370. //
  371. // err := req.Send()
  372. // if err == nil { // resp is now filled
  373. // fmt.Println(resp)
  374. // }
  375. //
  376. // See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/CreateSubscription
  377. func (c *Shield) CreateSubscriptionRequest(input *CreateSubscriptionInput) (req *request.Request, output *CreateSubscriptionOutput) {
  378. op := &request.Operation{
  379. Name: opCreateSubscription,
  380. HTTPMethod: "POST",
  381. HTTPPath: "/",
  382. }
  383. if input == nil {
  384. input = &CreateSubscriptionInput{}
  385. }
  386. output = &CreateSubscriptionOutput{}
  387. req = c.newRequest(op, input, output)
  388. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  389. return
  390. }
  391. // CreateSubscription API operation for AWS Shield.
  392. //
  393. // Activates AWS Shield Advanced for an account.
  394. //
  395. // As part of this request you can specify EmergencySettings that automaticaly
  396. // grant the DDoS response team (DRT) needed permissions to assist you during
  397. // a suspected DDoS attack. For more information see Authorize the DDoS Response
  398. // Team to Create Rules and Web ACLs on Your Behalf (https://docs.aws.amazon.com/waf/latest/developerguide/authorize-DRT.html).
  399. //
  400. // When you initally create a subscription, your subscription is set to be automatically
  401. // renewed at the end of the existing subscription period. You can change this
  402. // by submitting an UpdateSubscription request.
  403. //
  404. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  405. // with awserr.Error's Code and Message methods to get detailed information about
  406. // the error.
  407. //
  408. // See the AWS API reference guide for AWS Shield's
  409. // API operation CreateSubscription for usage and error information.
  410. //
  411. // Returned Error Codes:
  412. // * ErrCodeInternalErrorException "InternalErrorException"
  413. // Exception that indicates that a problem occurred with the service infrastructure.
  414. // You can retry the request.
  415. //
  416. // * ErrCodeResourceAlreadyExistsException "ResourceAlreadyExistsException"
  417. // Exception indicating the specified resource already exists.
  418. //
  419. // See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/CreateSubscription
  420. func (c *Shield) CreateSubscription(input *CreateSubscriptionInput) (*CreateSubscriptionOutput, error) {
  421. req, out := c.CreateSubscriptionRequest(input)
  422. return out, req.Send()
  423. }
  424. // CreateSubscriptionWithContext is the same as CreateSubscription with the addition of
  425. // the ability to pass a context and additional request options.
  426. //
  427. // See CreateSubscription for details on how to use this API operation.
  428. //
  429. // The context must be non-nil and will be used for request cancellation. If
  430. // the context is nil a panic will occur. In the future the SDK may create
  431. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  432. // for more information on using Contexts.
  433. func (c *Shield) CreateSubscriptionWithContext(ctx aws.Context, input *CreateSubscriptionInput, opts ...request.Option) (*CreateSubscriptionOutput, error) {
  434. req, out := c.CreateSubscriptionRequest(input)
  435. req.SetContext(ctx)
  436. req.ApplyOptions(opts...)
  437. return out, req.Send()
  438. }
  439. const opDeleteProtection = "DeleteProtection"
  440. // DeleteProtectionRequest generates a "aws/request.Request" representing the
  441. // client's request for the DeleteProtection operation. The "output" return
  442. // value will be populated with the request's response once the request completes
  443. // successfully.
  444. //
  445. // Use "Send" method on the returned Request to send the API call to the service.
  446. // the "output" return value is not valid until after Send returns without error.
  447. //
  448. // See DeleteProtection for more information on using the DeleteProtection
  449. // API call, and error handling.
  450. //
  451. // This method is useful when you want to inject custom logic or configuration
  452. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  453. //
  454. //
  455. // // Example sending a request using the DeleteProtectionRequest method.
  456. // req, resp := client.DeleteProtectionRequest(params)
  457. //
  458. // err := req.Send()
  459. // if err == nil { // resp is now filled
  460. // fmt.Println(resp)
  461. // }
  462. //
  463. // See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DeleteProtection
  464. func (c *Shield) DeleteProtectionRequest(input *DeleteProtectionInput) (req *request.Request, output *DeleteProtectionOutput) {
  465. op := &request.Operation{
  466. Name: opDeleteProtection,
  467. HTTPMethod: "POST",
  468. HTTPPath: "/",
  469. }
  470. if input == nil {
  471. input = &DeleteProtectionInput{}
  472. }
  473. output = &DeleteProtectionOutput{}
  474. req = c.newRequest(op, input, output)
  475. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  476. return
  477. }
  478. // DeleteProtection API operation for AWS Shield.
  479. //
  480. // Deletes an AWS Shield Advanced Protection.
  481. //
  482. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  483. // with awserr.Error's Code and Message methods to get detailed information about
  484. // the error.
  485. //
  486. // See the AWS API reference guide for AWS Shield's
  487. // API operation DeleteProtection for usage and error information.
  488. //
  489. // Returned Error Codes:
  490. // * ErrCodeInternalErrorException "InternalErrorException"
  491. // Exception that indicates that a problem occurred with the service infrastructure.
  492. // You can retry the request.
  493. //
  494. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  495. // Exception indicating the specified resource does not exist.
  496. //
  497. // * ErrCodeOptimisticLockException "OptimisticLockException"
  498. // Exception that indicates that the protection state has been modified by another
  499. // client. You can retry the request.
  500. //
  501. // See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DeleteProtection
  502. func (c *Shield) DeleteProtection(input *DeleteProtectionInput) (*DeleteProtectionOutput, error) {
  503. req, out := c.DeleteProtectionRequest(input)
  504. return out, req.Send()
  505. }
  506. // DeleteProtectionWithContext is the same as DeleteProtection with the addition of
  507. // the ability to pass a context and additional request options.
  508. //
  509. // See DeleteProtection for details on how to use this API operation.
  510. //
  511. // The context must be non-nil and will be used for request cancellation. If
  512. // the context is nil a panic will occur. In the future the SDK may create
  513. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  514. // for more information on using Contexts.
  515. func (c *Shield) DeleteProtectionWithContext(ctx aws.Context, input *DeleteProtectionInput, opts ...request.Option) (*DeleteProtectionOutput, error) {
  516. req, out := c.DeleteProtectionRequest(input)
  517. req.SetContext(ctx)
  518. req.ApplyOptions(opts...)
  519. return out, req.Send()
  520. }
  521. const opDeleteSubscription = "DeleteSubscription"
  522. // DeleteSubscriptionRequest generates a "aws/request.Request" representing the
  523. // client's request for the DeleteSubscription operation. The "output" return
  524. // value will be populated with the request's response once the request completes
  525. // successfully.
  526. //
  527. // Use "Send" method on the returned Request to send the API call to the service.
  528. // the "output" return value is not valid until after Send returns without error.
  529. //
  530. // See DeleteSubscription for more information on using the DeleteSubscription
  531. // API call, and error handling.
  532. //
  533. // This method is useful when you want to inject custom logic or configuration
  534. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  535. //
  536. //
  537. // // Example sending a request using the DeleteSubscriptionRequest method.
  538. // req, resp := client.DeleteSubscriptionRequest(params)
  539. //
  540. // err := req.Send()
  541. // if err == nil { // resp is now filled
  542. // fmt.Println(resp)
  543. // }
  544. //
  545. // See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DeleteSubscription
  546. //
  547. // Deprecated: DeleteSubscription has been deprecated
  548. func (c *Shield) DeleteSubscriptionRequest(input *DeleteSubscriptionInput) (req *request.Request, output *DeleteSubscriptionOutput) {
  549. if c.Client.Config.Logger != nil {
  550. c.Client.Config.Logger.Log("This operation, DeleteSubscription, has been deprecated")
  551. }
  552. op := &request.Operation{
  553. Name: opDeleteSubscription,
  554. HTTPMethod: "POST",
  555. HTTPPath: "/",
  556. }
  557. if input == nil {
  558. input = &DeleteSubscriptionInput{}
  559. }
  560. output = &DeleteSubscriptionOutput{}
  561. req = c.newRequest(op, input, output)
  562. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  563. return
  564. }
  565. // DeleteSubscription API operation for AWS Shield.
  566. //
  567. // Removes AWS Shield Advanced from an account. AWS Shield Advanced requires
  568. // a 1-year subscription commitment. You cannot delete a subscription prior
  569. // to the completion of that commitment.
  570. //
  571. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  572. // with awserr.Error's Code and Message methods to get detailed information about
  573. // the error.
  574. //
  575. // See the AWS API reference guide for AWS Shield's
  576. // API operation DeleteSubscription for usage and error information.
  577. //
  578. // Returned Error Codes:
  579. // * ErrCodeInternalErrorException "InternalErrorException"
  580. // Exception that indicates that a problem occurred with the service infrastructure.
  581. // You can retry the request.
  582. //
  583. // * ErrCodeLockedSubscriptionException "LockedSubscriptionException"
  584. // You are trying to update a subscription that has not yet completed the 1-year
  585. // commitment. You can change the AutoRenew parameter during the last 30 days
  586. // of your subscription. This exception indicates that you are attempting to
  587. // change AutoRenew prior to that period.
  588. //
  589. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  590. // Exception indicating the specified resource does not exist.
  591. //
  592. // See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DeleteSubscription
  593. //
  594. // Deprecated: DeleteSubscription has been deprecated
  595. func (c *Shield) DeleteSubscription(input *DeleteSubscriptionInput) (*DeleteSubscriptionOutput, error) {
  596. req, out := c.DeleteSubscriptionRequest(input)
  597. return out, req.Send()
  598. }
  599. // DeleteSubscriptionWithContext is the same as DeleteSubscription with the addition of
  600. // the ability to pass a context and additional request options.
  601. //
  602. // See DeleteSubscription for details on how to use this API operation.
  603. //
  604. // The context must be non-nil and will be used for request cancellation. If
  605. // the context is nil a panic will occur. In the future the SDK may create
  606. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  607. // for more information on using Contexts.
  608. //
  609. // Deprecated: DeleteSubscriptionWithContext has been deprecated
  610. func (c *Shield) DeleteSubscriptionWithContext(ctx aws.Context, input *DeleteSubscriptionInput, opts ...request.Option) (*DeleteSubscriptionOutput, error) {
  611. req, out := c.DeleteSubscriptionRequest(input)
  612. req.SetContext(ctx)
  613. req.ApplyOptions(opts...)
  614. return out, req.Send()
  615. }
  616. const opDescribeAttack = "DescribeAttack"
  617. // DescribeAttackRequest generates a "aws/request.Request" representing the
  618. // client's request for the DescribeAttack operation. The "output" return
  619. // value will be populated with the request's response once the request completes
  620. // successfully.
  621. //
  622. // Use "Send" method on the returned Request to send the API call to the service.
  623. // the "output" return value is not valid until after Send returns without error.
  624. //
  625. // See DescribeAttack for more information on using the DescribeAttack
  626. // API call, and error handling.
  627. //
  628. // This method is useful when you want to inject custom logic or configuration
  629. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  630. //
  631. //
  632. // // Example sending a request using the DescribeAttackRequest method.
  633. // req, resp := client.DescribeAttackRequest(params)
  634. //
  635. // err := req.Send()
  636. // if err == nil { // resp is now filled
  637. // fmt.Println(resp)
  638. // }
  639. //
  640. // See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DescribeAttack
  641. func (c *Shield) DescribeAttackRequest(input *DescribeAttackInput) (req *request.Request, output *DescribeAttackOutput) {
  642. op := &request.Operation{
  643. Name: opDescribeAttack,
  644. HTTPMethod: "POST",
  645. HTTPPath: "/",
  646. }
  647. if input == nil {
  648. input = &DescribeAttackInput{}
  649. }
  650. output = &DescribeAttackOutput{}
  651. req = c.newRequest(op, input, output)
  652. return
  653. }
  654. // DescribeAttack API operation for AWS Shield.
  655. //
  656. // Describes the details of a DDoS attack.
  657. //
  658. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  659. // with awserr.Error's Code and Message methods to get detailed information about
  660. // the error.
  661. //
  662. // See the AWS API reference guide for AWS Shield's
  663. // API operation DescribeAttack for usage and error information.
  664. //
  665. // Returned Error Codes:
  666. // * ErrCodeInternalErrorException "InternalErrorException"
  667. // Exception that indicates that a problem occurred with the service infrastructure.
  668. // You can retry the request.
  669. //
  670. // * ErrCodeAccessDeniedException "AccessDeniedException"
  671. //
  672. // See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DescribeAttack
  673. func (c *Shield) DescribeAttack(input *DescribeAttackInput) (*DescribeAttackOutput, error) {
  674. req, out := c.DescribeAttackRequest(input)
  675. return out, req.Send()
  676. }
  677. // DescribeAttackWithContext is the same as DescribeAttack with the addition of
  678. // the ability to pass a context and additional request options.
  679. //
  680. // See DescribeAttack for details on how to use this API operation.
  681. //
  682. // The context must be non-nil and will be used for request cancellation. If
  683. // the context is nil a panic will occur. In the future the SDK may create
  684. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  685. // for more information on using Contexts.
  686. func (c *Shield) DescribeAttackWithContext(ctx aws.Context, input *DescribeAttackInput, opts ...request.Option) (*DescribeAttackOutput, error) {
  687. req, out := c.DescribeAttackRequest(input)
  688. req.SetContext(ctx)
  689. req.ApplyOptions(opts...)
  690. return out, req.Send()
  691. }
  692. const opDescribeDRTAccess = "DescribeDRTAccess"
  693. // DescribeDRTAccessRequest generates a "aws/request.Request" representing the
  694. // client's request for the DescribeDRTAccess operation. The "output" return
  695. // value will be populated with the request's response once the request completes
  696. // successfully.
  697. //
  698. // Use "Send" method on the returned Request to send the API call to the service.
  699. // the "output" return value is not valid until after Send returns without error.
  700. //
  701. // See DescribeDRTAccess for more information on using the DescribeDRTAccess
  702. // API call, and error handling.
  703. //
  704. // This method is useful when you want to inject custom logic or configuration
  705. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  706. //
  707. //
  708. // // Example sending a request using the DescribeDRTAccessRequest method.
  709. // req, resp := client.DescribeDRTAccessRequest(params)
  710. //
  711. // err := req.Send()
  712. // if err == nil { // resp is now filled
  713. // fmt.Println(resp)
  714. // }
  715. //
  716. // See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DescribeDRTAccess
  717. func (c *Shield) DescribeDRTAccessRequest(input *DescribeDRTAccessInput) (req *request.Request, output *DescribeDRTAccessOutput) {
  718. op := &request.Operation{
  719. Name: opDescribeDRTAccess,
  720. HTTPMethod: "POST",
  721. HTTPPath: "/",
  722. }
  723. if input == nil {
  724. input = &DescribeDRTAccessInput{}
  725. }
  726. output = &DescribeDRTAccessOutput{}
  727. req = c.newRequest(op, input, output)
  728. return
  729. }
  730. // DescribeDRTAccess API operation for AWS Shield.
  731. //
  732. // Returns the current role and list of Amazon S3 log buckets used by the DDoS
  733. // Response team (DRT) to access your AWS account while assisting with attack
  734. // mitigation.
  735. //
  736. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  737. // with awserr.Error's Code and Message methods to get detailed information about
  738. // the error.
  739. //
  740. // See the AWS API reference guide for AWS Shield's
  741. // API operation DescribeDRTAccess for usage and error information.
  742. //
  743. // Returned Error Codes:
  744. // * ErrCodeInternalErrorException "InternalErrorException"
  745. // Exception that indicates that a problem occurred with the service infrastructure.
  746. // You can retry the request.
  747. //
  748. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  749. // Exception indicating the specified resource does not exist.
  750. //
  751. // See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DescribeDRTAccess
  752. func (c *Shield) DescribeDRTAccess(input *DescribeDRTAccessInput) (*DescribeDRTAccessOutput, error) {
  753. req, out := c.DescribeDRTAccessRequest(input)
  754. return out, req.Send()
  755. }
  756. // DescribeDRTAccessWithContext is the same as DescribeDRTAccess with the addition of
  757. // the ability to pass a context and additional request options.
  758. //
  759. // See DescribeDRTAccess for details on how to use this API operation.
  760. //
  761. // The context must be non-nil and will be used for request cancellation. If
  762. // the context is nil a panic will occur. In the future the SDK may create
  763. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  764. // for more information on using Contexts.
  765. func (c *Shield) DescribeDRTAccessWithContext(ctx aws.Context, input *DescribeDRTAccessInput, opts ...request.Option) (*DescribeDRTAccessOutput, error) {
  766. req, out := c.DescribeDRTAccessRequest(input)
  767. req.SetContext(ctx)
  768. req.ApplyOptions(opts...)
  769. return out, req.Send()
  770. }
  771. const opDescribeEmergencyContactSettings = "DescribeEmergencyContactSettings"
  772. // DescribeEmergencyContactSettingsRequest generates a "aws/request.Request" representing the
  773. // client's request for the DescribeEmergencyContactSettings operation. The "output" return
  774. // value will be populated with the request's response once the request completes
  775. // successfully.
  776. //
  777. // Use "Send" method on the returned Request to send the API call to the service.
  778. // the "output" return value is not valid until after Send returns without error.
  779. //
  780. // See DescribeEmergencyContactSettings for more information on using the DescribeEmergencyContactSettings
  781. // API call, and error handling.
  782. //
  783. // This method is useful when you want to inject custom logic or configuration
  784. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  785. //
  786. //
  787. // // Example sending a request using the DescribeEmergencyContactSettingsRequest method.
  788. // req, resp := client.DescribeEmergencyContactSettingsRequest(params)
  789. //
  790. // err := req.Send()
  791. // if err == nil { // resp is now filled
  792. // fmt.Println(resp)
  793. // }
  794. //
  795. // See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DescribeEmergencyContactSettings
  796. func (c *Shield) DescribeEmergencyContactSettingsRequest(input *DescribeEmergencyContactSettingsInput) (req *request.Request, output *DescribeEmergencyContactSettingsOutput) {
  797. op := &request.Operation{
  798. Name: opDescribeEmergencyContactSettings,
  799. HTTPMethod: "POST",
  800. HTTPPath: "/",
  801. }
  802. if input == nil {
  803. input = &DescribeEmergencyContactSettingsInput{}
  804. }
  805. output = &DescribeEmergencyContactSettingsOutput{}
  806. req = c.newRequest(op, input, output)
  807. return
  808. }
  809. // DescribeEmergencyContactSettings API operation for AWS Shield.
  810. //
  811. // Lists the email addresses that the DRT can use to contact you during a suspected
  812. // attack.
  813. //
  814. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  815. // with awserr.Error's Code and Message methods to get detailed information about
  816. // the error.
  817. //
  818. // See the AWS API reference guide for AWS Shield's
  819. // API operation DescribeEmergencyContactSettings for usage and error information.
  820. //
  821. // Returned Error Codes:
  822. // * ErrCodeInternalErrorException "InternalErrorException"
  823. // Exception that indicates that a problem occurred with the service infrastructure.
  824. // You can retry the request.
  825. //
  826. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  827. // Exception indicating the specified resource does not exist.
  828. //
  829. // See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DescribeEmergencyContactSettings
  830. func (c *Shield) DescribeEmergencyContactSettings(input *DescribeEmergencyContactSettingsInput) (*DescribeEmergencyContactSettingsOutput, error) {
  831. req, out := c.DescribeEmergencyContactSettingsRequest(input)
  832. return out, req.Send()
  833. }
  834. // DescribeEmergencyContactSettingsWithContext is the same as DescribeEmergencyContactSettings with the addition of
  835. // the ability to pass a context and additional request options.
  836. //
  837. // See DescribeEmergencyContactSettings for details on how to use this API operation.
  838. //
  839. // The context must be non-nil and will be used for request cancellation. If
  840. // the context is nil a panic will occur. In the future the SDK may create
  841. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  842. // for more information on using Contexts.
  843. func (c *Shield) DescribeEmergencyContactSettingsWithContext(ctx aws.Context, input *DescribeEmergencyContactSettingsInput, opts ...request.Option) (*DescribeEmergencyContactSettingsOutput, error) {
  844. req, out := c.DescribeEmergencyContactSettingsRequest(input)
  845. req.SetContext(ctx)
  846. req.ApplyOptions(opts...)
  847. return out, req.Send()
  848. }
  849. const opDescribeProtection = "DescribeProtection"
  850. // DescribeProtectionRequest generates a "aws/request.Request" representing the
  851. // client's request for the DescribeProtection operation. The "output" return
  852. // value will be populated with the request's response once the request completes
  853. // successfully.
  854. //
  855. // Use "Send" method on the returned Request to send the API call to the service.
  856. // the "output" return value is not valid until after Send returns without error.
  857. //
  858. // See DescribeProtection for more information on using the DescribeProtection
  859. // API call, and error handling.
  860. //
  861. // This method is useful when you want to inject custom logic or configuration
  862. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  863. //
  864. //
  865. // // Example sending a request using the DescribeProtectionRequest method.
  866. // req, resp := client.DescribeProtectionRequest(params)
  867. //
  868. // err := req.Send()
  869. // if err == nil { // resp is now filled
  870. // fmt.Println(resp)
  871. // }
  872. //
  873. // See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DescribeProtection
  874. func (c *Shield) DescribeProtectionRequest(input *DescribeProtectionInput) (req *request.Request, output *DescribeProtectionOutput) {
  875. op := &request.Operation{
  876. Name: opDescribeProtection,
  877. HTTPMethod: "POST",
  878. HTTPPath: "/",
  879. }
  880. if input == nil {
  881. input = &DescribeProtectionInput{}
  882. }
  883. output = &DescribeProtectionOutput{}
  884. req = c.newRequest(op, input, output)
  885. return
  886. }
  887. // DescribeProtection API operation for AWS Shield.
  888. //
  889. // Lists the details of a Protection object.
  890. //
  891. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  892. // with awserr.Error's Code and Message methods to get detailed information about
  893. // the error.
  894. //
  895. // See the AWS API reference guide for AWS Shield's
  896. // API operation DescribeProtection for usage and error information.
  897. //
  898. // Returned Error Codes:
  899. // * ErrCodeInternalErrorException "InternalErrorException"
  900. // Exception that indicates that a problem occurred with the service infrastructure.
  901. // You can retry the request.
  902. //
  903. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  904. // Exception indicating the specified resource does not exist.
  905. //
  906. // See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DescribeProtection
  907. func (c *Shield) DescribeProtection(input *DescribeProtectionInput) (*DescribeProtectionOutput, error) {
  908. req, out := c.DescribeProtectionRequest(input)
  909. return out, req.Send()
  910. }
  911. // DescribeProtectionWithContext is the same as DescribeProtection with the addition of
  912. // the ability to pass a context and additional request options.
  913. //
  914. // See DescribeProtection for details on how to use this API operation.
  915. //
  916. // The context must be non-nil and will be used for request cancellation. If
  917. // the context is nil a panic will occur. In the future the SDK may create
  918. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  919. // for more information on using Contexts.
  920. func (c *Shield) DescribeProtectionWithContext(ctx aws.Context, input *DescribeProtectionInput, opts ...request.Option) (*DescribeProtectionOutput, error) {
  921. req, out := c.DescribeProtectionRequest(input)
  922. req.SetContext(ctx)
  923. req.ApplyOptions(opts...)
  924. return out, req.Send()
  925. }
  926. const opDescribeSubscription = "DescribeSubscription"
  927. // DescribeSubscriptionRequest generates a "aws/request.Request" representing the
  928. // client's request for the DescribeSubscription operation. The "output" return
  929. // value will be populated with the request's response once the request completes
  930. // successfully.
  931. //
  932. // Use "Send" method on the returned Request to send the API call to the service.
  933. // the "output" return value is not valid until after Send returns without error.
  934. //
  935. // See DescribeSubscription for more information on using the DescribeSubscription
  936. // API call, and error handling.
  937. //
  938. // This method is useful when you want to inject custom logic or configuration
  939. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  940. //
  941. //
  942. // // Example sending a request using the DescribeSubscriptionRequest method.
  943. // req, resp := client.DescribeSubscriptionRequest(params)
  944. //
  945. // err := req.Send()
  946. // if err == nil { // resp is now filled
  947. // fmt.Println(resp)
  948. // }
  949. //
  950. // See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DescribeSubscription
  951. func (c *Shield) DescribeSubscriptionRequest(input *DescribeSubscriptionInput) (req *request.Request, output *DescribeSubscriptionOutput) {
  952. op := &request.Operation{
  953. Name: opDescribeSubscription,
  954. HTTPMethod: "POST",
  955. HTTPPath: "/",
  956. }
  957. if input == nil {
  958. input = &DescribeSubscriptionInput{}
  959. }
  960. output = &DescribeSubscriptionOutput{}
  961. req = c.newRequest(op, input, output)
  962. return
  963. }
  964. // DescribeSubscription API operation for AWS Shield.
  965. //
  966. // Provides details about the AWS Shield Advanced subscription for an account.
  967. //
  968. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  969. // with awserr.Error's Code and Message methods to get detailed information about
  970. // the error.
  971. //
  972. // See the AWS API reference guide for AWS Shield's
  973. // API operation DescribeSubscription for usage and error information.
  974. //
  975. // Returned Error Codes:
  976. // * ErrCodeInternalErrorException "InternalErrorException"
  977. // Exception that indicates that a problem occurred with the service infrastructure.
  978. // You can retry the request.
  979. //
  980. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  981. // Exception indicating the specified resource does not exist.
  982. //
  983. // See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DescribeSubscription
  984. func (c *Shield) DescribeSubscription(input *DescribeSubscriptionInput) (*DescribeSubscriptionOutput, error) {
  985. req, out := c.DescribeSubscriptionRequest(input)
  986. return out, req.Send()
  987. }
  988. // DescribeSubscriptionWithContext is the same as DescribeSubscription with the addition of
  989. // the ability to pass a context and additional request options.
  990. //
  991. // See DescribeSubscription for details on how to use this API operation.
  992. //
  993. // The context must be non-nil and will be used for request cancellation. If
  994. // the context is nil a panic will occur. In the future the SDK may create
  995. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  996. // for more information on using Contexts.
  997. func (c *Shield) DescribeSubscriptionWithContext(ctx aws.Context, input *DescribeSubscriptionInput, opts ...request.Option) (*DescribeSubscriptionOutput, error) {
  998. req, out := c.DescribeSubscriptionRequest(input)
  999. req.SetContext(ctx)
  1000. req.ApplyOptions(opts...)
  1001. return out, req.Send()
  1002. }
  1003. const opDisassociateDRTLogBucket = "DisassociateDRTLogBucket"
  1004. // DisassociateDRTLogBucketRequest generates a "aws/request.Request" representing the
  1005. // client's request for the DisassociateDRTLogBucket operation. The "output" return
  1006. // value will be populated with the request's response once the request completes
  1007. // successfully.
  1008. //
  1009. // Use "Send" method on the returned Request to send the API call to the service.
  1010. // the "output" return value is not valid until after Send returns without error.
  1011. //
  1012. // See DisassociateDRTLogBucket for more information on using the DisassociateDRTLogBucket
  1013. // API call, and error handling.
  1014. //
  1015. // This method is useful when you want to inject custom logic or configuration
  1016. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1017. //
  1018. //
  1019. // // Example sending a request using the DisassociateDRTLogBucketRequest method.
  1020. // req, resp := client.DisassociateDRTLogBucketRequest(params)
  1021. //
  1022. // err := req.Send()
  1023. // if err == nil { // resp is now filled
  1024. // fmt.Println(resp)
  1025. // }
  1026. //
  1027. // See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DisassociateDRTLogBucket
  1028. func (c *Shield) DisassociateDRTLogBucketRequest(input *DisassociateDRTLogBucketInput) (req *request.Request, output *DisassociateDRTLogBucketOutput) {
  1029. op := &request.Operation{
  1030. Name: opDisassociateDRTLogBucket,
  1031. HTTPMethod: "POST",
  1032. HTTPPath: "/",
  1033. }
  1034. if input == nil {
  1035. input = &DisassociateDRTLogBucketInput{}
  1036. }
  1037. output = &DisassociateDRTLogBucketOutput{}
  1038. req = c.newRequest(op, input, output)
  1039. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1040. return
  1041. }
  1042. // DisassociateDRTLogBucket API operation for AWS Shield.
  1043. //
  1044. // Removes the DDoS Response team's (DRT) access to the specified Amazon S3
  1045. // bucket containing your flow logs.
  1046. //
  1047. // To make a DisassociateDRTLogBucket request, you must be subscribed to the
  1048. // Business Support plan (https://aws.amazon.com/premiumsupport/business-support/)
  1049. // or the Enterprise Support plan (https://aws.amazon.com/premiumsupport/enterprise-support/).
  1050. // However, if you are not subscribed to one of these support plans, but had
  1051. // been previously and had granted the DRT access to your account, you can submit
  1052. // a DisassociateDRTLogBucket request to remove this access.
  1053. //
  1054. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1055. // with awserr.Error's Code and Message methods to get detailed information about
  1056. // the error.
  1057. //
  1058. // See the AWS API reference guide for AWS Shield's
  1059. // API operation DisassociateDRTLogBucket for usage and error information.
  1060. //
  1061. // Returned Error Codes:
  1062. // * ErrCodeInternalErrorException "InternalErrorException"
  1063. // Exception that indicates that a problem occurred with the service infrastructure.
  1064. // You can retry the request.
  1065. //
  1066. // * ErrCodeInvalidOperationException "InvalidOperationException"
  1067. // Exception that indicates that the operation would not cause any change to
  1068. // occur.
  1069. //
  1070. // * ErrCodeNoAssociatedRoleException "NoAssociatedRoleException"
  1071. // The ARN of the role that you specifed does not exist.
  1072. //
  1073. // * ErrCodeAccessDeniedForDependencyException "AccessDeniedForDependencyException"
  1074. // In order to grant the necessary access to the DDoS Response Team, the user
  1075. // submitting AssociateDRTRole must have the iam:PassRole permission. This error
  1076. // indicates the user did not have the appropriate permissions. For more information,
  1077. // see Granting a User Permissions to Pass a Role to an AWS Service (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use_passrole.html).
  1078. //
  1079. // * ErrCodeOptimisticLockException "OptimisticLockException"
  1080. // Exception that indicates that the protection state has been modified by another
  1081. // client. You can retry the request.
  1082. //
  1083. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1084. // Exception indicating the specified resource does not exist.
  1085. //
  1086. // See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DisassociateDRTLogBucket
  1087. func (c *Shield) DisassociateDRTLogBucket(input *DisassociateDRTLogBucketInput) (*DisassociateDRTLogBucketOutput, error) {
  1088. req, out := c.DisassociateDRTLogBucketRequest(input)
  1089. return out, req.Send()
  1090. }
  1091. // DisassociateDRTLogBucketWithContext is the same as DisassociateDRTLogBucket with the addition of
  1092. // the ability to pass a context and additional request options.
  1093. //
  1094. // See DisassociateDRTLogBucket for details on how to use this API operation.
  1095. //
  1096. // The context must be non-nil and will be used for request cancellation. If
  1097. // the context is nil a panic will occur. In the future the SDK may create
  1098. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1099. // for more information on using Contexts.
  1100. func (c *Shield) DisassociateDRTLogBucketWithContext(ctx aws.Context, input *DisassociateDRTLogBucketInput, opts ...request.Option) (*DisassociateDRTLogBucketOutput, error) {
  1101. req, out := c.DisassociateDRTLogBucketRequest(input)
  1102. req.SetContext(ctx)
  1103. req.ApplyOptions(opts...)
  1104. return out, req.Send()
  1105. }
  1106. const opDisassociateDRTRole = "DisassociateDRTRole"
  1107. // DisassociateDRTRoleRequest generates a "aws/request.Request" representing the
  1108. // client's request for the DisassociateDRTRole operation. The "output" return
  1109. // value will be populated with the request's response once the request completes
  1110. // successfully.
  1111. //
  1112. // Use "Send" method on the returned Request to send the API call to the service.
  1113. // the "output" return value is not valid until after Send returns without error.
  1114. //
  1115. // See DisassociateDRTRole for more information on using the DisassociateDRTRole
  1116. // API call, and error handling.
  1117. //
  1118. // This method is useful when you want to inject custom logic or configuration
  1119. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1120. //
  1121. //
  1122. // // Example sending a request using the DisassociateDRTRoleRequest method.
  1123. // req, resp := client.DisassociateDRTRoleRequest(params)
  1124. //
  1125. // err := req.Send()
  1126. // if err == nil { // resp is now filled
  1127. // fmt.Println(resp)
  1128. // }
  1129. //
  1130. // See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DisassociateDRTRole
  1131. func (c *Shield) DisassociateDRTRoleRequest(input *DisassociateDRTRoleInput) (req *request.Request, output *DisassociateDRTRoleOutput) {
  1132. op := &request.Operation{
  1133. Name: opDisassociateDRTRole,
  1134. HTTPMethod: "POST",
  1135. HTTPPath: "/",
  1136. }
  1137. if input == nil {
  1138. input = &DisassociateDRTRoleInput{}
  1139. }
  1140. output = &DisassociateDRTRoleOutput{}
  1141. req = c.newRequest(op, input, output)
  1142. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1143. return
  1144. }
  1145. // DisassociateDRTRole API operation for AWS Shield.
  1146. //
  1147. // Removes the DDoS Response team's (DRT) access to your AWS account.
  1148. //
  1149. // To make a DisassociateDRTRole request, you must be subscribed to the Business
  1150. // Support plan (https://aws.amazon.com/premiumsupport/business-support/) or
  1151. // the Enterprise Support plan (https://aws.amazon.com/premiumsupport/enterprise-support/).
  1152. // However, if you are not subscribed to one of these support plans, but had
  1153. // been previously and had granted the DRT access to your account, you can submit
  1154. // a DisassociateDRTRole request to remove this access.
  1155. //
  1156. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1157. // with awserr.Error's Code and Message methods to get detailed information about
  1158. // the error.
  1159. //
  1160. // See the AWS API reference guide for AWS Shield's
  1161. // API operation DisassociateDRTRole for usage and error information.
  1162. //
  1163. // Returned Error Codes:
  1164. // * ErrCodeInternalErrorException "InternalErrorException"
  1165. // Exception that indicates that a problem occurred with the service infrastructure.
  1166. // You can retry the request.
  1167. //
  1168. // * ErrCodeInvalidOperationException "InvalidOperationException"
  1169. // Exception that indicates that the operation would not cause any change to
  1170. // occur.
  1171. //
  1172. // * ErrCodeOptimisticLockException "OptimisticLockException"
  1173. // Exception that indicates that the protection state has been modified by another
  1174. // client. You can retry the request.
  1175. //
  1176. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1177. // Exception indicating the specified resource does not exist.
  1178. //
  1179. // See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/DisassociateDRTRole
  1180. func (c *Shield) DisassociateDRTRole(input *DisassociateDRTRoleInput) (*DisassociateDRTRoleOutput, error) {
  1181. req, out := c.DisassociateDRTRoleRequest(input)
  1182. return out, req.Send()
  1183. }
  1184. // DisassociateDRTRoleWithContext is the same as DisassociateDRTRole with the addition of
  1185. // the ability to pass a context and additional request options.
  1186. //
  1187. // See DisassociateDRTRole for details on how to use this API operation.
  1188. //
  1189. // The context must be non-nil and will be used for request cancellation. If
  1190. // the context is nil a panic will occur. In the future the SDK may create
  1191. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1192. // for more information on using Contexts.
  1193. func (c *Shield) DisassociateDRTRoleWithContext(ctx aws.Context, input *DisassociateDRTRoleInput, opts ...request.Option) (*DisassociateDRTRoleOutput, error) {
  1194. req, out := c.DisassociateDRTRoleRequest(input)
  1195. req.SetContext(ctx)
  1196. req.ApplyOptions(opts...)
  1197. return out, req.Send()
  1198. }
  1199. const opGetSubscriptionState = "GetSubscriptionState"
  1200. // GetSubscriptionStateRequest generates a "aws/request.Request" representing the
  1201. // client's request for the GetSubscriptionState operation. The "output" return
  1202. // value will be populated with the request's response once the request completes
  1203. // successfully.
  1204. //
  1205. // Use "Send" method on the returned Request to send the API call to the service.
  1206. // the "output" return value is not valid until after Send returns without error.
  1207. //
  1208. // See GetSubscriptionState for more information on using the GetSubscriptionState
  1209. // API call, and error handling.
  1210. //
  1211. // This method is useful when you want to inject custom logic or configuration
  1212. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1213. //
  1214. //
  1215. // // Example sending a request using the GetSubscriptionStateRequest method.
  1216. // req, resp := client.GetSubscriptionStateRequest(params)
  1217. //
  1218. // err := req.Send()
  1219. // if err == nil { // resp is now filled
  1220. // fmt.Println(resp)
  1221. // }
  1222. //
  1223. // See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/GetSubscriptionState
  1224. func (c *Shield) GetSubscriptionStateRequest(input *GetSubscriptionStateInput) (req *request.Request, output *GetSubscriptionStateOutput) {
  1225. op := &request.Operation{
  1226. Name: opGetSubscriptionState,
  1227. HTTPMethod: "POST",
  1228. HTTPPath: "/",
  1229. }
  1230. if input == nil {
  1231. input = &GetSubscriptionStateInput{}
  1232. }
  1233. output = &GetSubscriptionStateOutput{}
  1234. req = c.newRequest(op, input, output)
  1235. return
  1236. }
  1237. // GetSubscriptionState API operation for AWS Shield.
  1238. //
  1239. // Returns the SubscriptionState, either Active or Inactive.
  1240. //
  1241. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1242. // with awserr.Error's Code and Message methods to get detailed information about
  1243. // the error.
  1244. //
  1245. // See the AWS API reference guide for AWS Shield's
  1246. // API operation GetSubscriptionState for usage and error information.
  1247. //
  1248. // Returned Error Codes:
  1249. // * ErrCodeInternalErrorException "InternalErrorException"
  1250. // Exception that indicates that a problem occurred with the service infrastructure.
  1251. // You can retry the request.
  1252. //
  1253. // See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/GetSubscriptionState
  1254. func (c *Shield) GetSubscriptionState(input *GetSubscriptionStateInput) (*GetSubscriptionStateOutput, error) {
  1255. req, out := c.GetSubscriptionStateRequest(input)
  1256. return out, req.Send()
  1257. }
  1258. // GetSubscriptionStateWithContext is the same as GetSubscriptionState with the addition of
  1259. // the ability to pass a context and additional request options.
  1260. //
  1261. // See GetSubscriptionState for details on how to use this API operation.
  1262. //
  1263. // The context must be non-nil and will be used for request cancellation. If
  1264. // the context is nil a panic will occur. In the future the SDK may create
  1265. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1266. // for more information on using Contexts.
  1267. func (c *Shield) GetSubscriptionStateWithContext(ctx aws.Context, input *GetSubscriptionStateInput, opts ...request.Option) (*GetSubscriptionStateOutput, error) {
  1268. req, out := c.GetSubscriptionStateRequest(input)
  1269. req.SetContext(ctx)
  1270. req.ApplyOptions(opts...)
  1271. return out, req.Send()
  1272. }
  1273. const opListAttacks = "ListAttacks"
  1274. // ListAttacksRequest generates a "aws/request.Request" representing the
  1275. // client's request for the ListAttacks operation. The "output" return
  1276. // value will be populated with the request's response once the request completes
  1277. // successfully.
  1278. //
  1279. // Use "Send" method on the returned Request to send the API call to the service.
  1280. // the "output" return value is not valid until after Send returns without error.
  1281. //
  1282. // See ListAttacks for more information on using the ListAttacks
  1283. // API call, and error handling.
  1284. //
  1285. // This method is useful when you want to inject custom logic or configuration
  1286. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1287. //
  1288. //
  1289. // // Example sending a request using the ListAttacksRequest method.
  1290. // req, resp := client.ListAttacksRequest(params)
  1291. //
  1292. // err := req.Send()
  1293. // if err == nil { // resp is now filled
  1294. // fmt.Println(resp)
  1295. // }
  1296. //
  1297. // See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/ListAttacks
  1298. func (c *Shield) ListAttacksRequest(input *ListAttacksInput) (req *request.Request, output *ListAttacksOutput) {
  1299. op := &request.Operation{
  1300. Name: opListAttacks,
  1301. HTTPMethod: "POST",
  1302. HTTPPath: "/",
  1303. }
  1304. if input == nil {
  1305. input = &ListAttacksInput{}
  1306. }
  1307. output = &ListAttacksOutput{}
  1308. req = c.newRequest(op, input, output)
  1309. return
  1310. }
  1311. // ListAttacks API operation for AWS Shield.
  1312. //
  1313. // Returns all ongoing DDoS attacks or all DDoS attacks during a specified time
  1314. // period.
  1315. //
  1316. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1317. // with awserr.Error's Code and Message methods to get detailed information about
  1318. // the error.
  1319. //
  1320. // See the AWS API reference guide for AWS Shield's
  1321. // API operation ListAttacks for usage and error information.
  1322. //
  1323. // Returned Error Codes:
  1324. // * ErrCodeInternalErrorException "InternalErrorException"
  1325. // Exception that indicates that a problem occurred with the service infrastructure.
  1326. // You can retry the request.
  1327. //
  1328. // * ErrCodeInvalidParameterException "InvalidParameterException"
  1329. // Exception that indicates that the parameters passed to the API are invalid.
  1330. //
  1331. // * ErrCodeInvalidOperationException "InvalidOperationException"
  1332. // Exception that indicates that the operation would not cause any change to
  1333. // occur.
  1334. //
  1335. // See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/ListAttacks
  1336. func (c *Shield) ListAttacks(input *ListAttacksInput) (*ListAttacksOutput, error) {
  1337. req, out := c.ListAttacksRequest(input)
  1338. return out, req.Send()
  1339. }
  1340. // ListAttacksWithContext is the same as ListAttacks with the addition of
  1341. // the ability to pass a context and additional request options.
  1342. //
  1343. // See ListAttacks for details on how to use this API operation.
  1344. //
  1345. // The context must be non-nil and will be used for request cancellation. If
  1346. // the context is nil a panic will occur. In the future the SDK may create
  1347. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1348. // for more information on using Contexts.
  1349. func (c *Shield) ListAttacksWithContext(ctx aws.Context, input *ListAttacksInput, opts ...request.Option) (*ListAttacksOutput, error) {
  1350. req, out := c.ListAttacksRequest(input)
  1351. req.SetContext(ctx)
  1352. req.ApplyOptions(opts...)
  1353. return out, req.Send()
  1354. }
  1355. const opListProtections = "ListProtections"
  1356. // ListProtectionsRequest generates a "aws/request.Request" representing the
  1357. // client's request for the ListProtections operation. The "output" return
  1358. // value will be populated with the request's response once the request completes
  1359. // successfully.
  1360. //
  1361. // Use "Send" method on the returned Request to send the API call to the service.
  1362. // the "output" return value is not valid until after Send returns without error.
  1363. //
  1364. // See ListProtections for more information on using the ListProtections
  1365. // API call, and error handling.
  1366. //
  1367. // This method is useful when you want to inject custom logic or configuration
  1368. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1369. //
  1370. //
  1371. // // Example sending a request using the ListProtectionsRequest method.
  1372. // req, resp := client.ListProtectionsRequest(params)
  1373. //
  1374. // err := req.Send()
  1375. // if err == nil { // resp is now filled
  1376. // fmt.Println(resp)
  1377. // }
  1378. //
  1379. // See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/ListProtections
  1380. func (c *Shield) ListProtectionsRequest(input *ListProtectionsInput) (req *request.Request, output *ListProtectionsOutput) {
  1381. op := &request.Operation{
  1382. Name: opListProtections,
  1383. HTTPMethod: "POST",
  1384. HTTPPath: "/",
  1385. }
  1386. if input == nil {
  1387. input = &ListProtectionsInput{}
  1388. }
  1389. output = &ListProtectionsOutput{}
  1390. req = c.newRequest(op, input, output)
  1391. return
  1392. }
  1393. // ListProtections API operation for AWS Shield.
  1394. //
  1395. // Lists all Protection objects for the account.
  1396. //
  1397. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1398. // with awserr.Error's Code and Message methods to get detailed information about
  1399. // the error.
  1400. //
  1401. // See the AWS API reference guide for AWS Shield's
  1402. // API operation ListProtections for usage and error information.
  1403. //
  1404. // Returned Error Codes:
  1405. // * ErrCodeInternalErrorException "InternalErrorException"
  1406. // Exception that indicates that a problem occurred with the service infrastructure.
  1407. // You can retry the request.
  1408. //
  1409. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1410. // Exception indicating the specified resource does not exist.
  1411. //
  1412. // * ErrCodeInvalidPaginationTokenException "InvalidPaginationTokenException"
  1413. // Exception that indicates that the NextToken specified in the request is invalid.
  1414. // Submit the request using the NextToken value that was returned in the response.
  1415. //
  1416. // See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/ListProtections
  1417. func (c *Shield) ListProtections(input *ListProtectionsInput) (*ListProtectionsOutput, error) {
  1418. req, out := c.ListProtectionsRequest(input)
  1419. return out, req.Send()
  1420. }
  1421. // ListProtectionsWithContext is the same as ListProtections with the addition of
  1422. // the ability to pass a context and additional request options.
  1423. //
  1424. // See ListProtections for details on how to use this API operation.
  1425. //
  1426. // The context must be non-nil and will be used for request cancellation. If
  1427. // the context is nil a panic will occur. In the future the SDK may create
  1428. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1429. // for more information on using Contexts.
  1430. func (c *Shield) ListProtectionsWithContext(ctx aws.Context, input *ListProtectionsInput, opts ...request.Option) (*ListProtectionsOutput, error) {
  1431. req, out := c.ListProtectionsRequest(input)
  1432. req.SetContext(ctx)
  1433. req.ApplyOptions(opts...)
  1434. return out, req.Send()
  1435. }
  1436. const opUpdateEmergencyContactSettings = "UpdateEmergencyContactSettings"
  1437. // UpdateEmergencyContactSettingsRequest generates a "aws/request.Request" representing the
  1438. // client's request for the UpdateEmergencyContactSettings operation. The "output" return
  1439. // value will be populated with the request's response once the request completes
  1440. // successfully.
  1441. //
  1442. // Use "Send" method on the returned Request to send the API call to the service.
  1443. // the "output" return value is not valid until after Send returns without error.
  1444. //
  1445. // See UpdateEmergencyContactSettings for more information on using the UpdateEmergencyContactSettings
  1446. // API call, and error handling.
  1447. //
  1448. // This method is useful when you want to inject custom logic or configuration
  1449. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1450. //
  1451. //
  1452. // // Example sending a request using the UpdateEmergencyContactSettingsRequest method.
  1453. // req, resp := client.UpdateEmergencyContactSettingsRequest(params)
  1454. //
  1455. // err := req.Send()
  1456. // if err == nil { // resp is now filled
  1457. // fmt.Println(resp)
  1458. // }
  1459. //
  1460. // See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/UpdateEmergencyContactSettings
  1461. func (c *Shield) UpdateEmergencyContactSettingsRequest(input *UpdateEmergencyContactSettingsInput) (req *request.Request, output *UpdateEmergencyContactSettingsOutput) {
  1462. op := &request.Operation{
  1463. Name: opUpdateEmergencyContactSettings,
  1464. HTTPMethod: "POST",
  1465. HTTPPath: "/",
  1466. }
  1467. if input == nil {
  1468. input = &UpdateEmergencyContactSettingsInput{}
  1469. }
  1470. output = &UpdateEmergencyContactSettingsOutput{}
  1471. req = c.newRequest(op, input, output)
  1472. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1473. return
  1474. }
  1475. // UpdateEmergencyContactSettings API operation for AWS Shield.
  1476. //
  1477. // Updates the details of the list of email addresses that the DRT can use to
  1478. // contact you during a suspected attack.
  1479. //
  1480. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1481. // with awserr.Error's Code and Message methods to get detailed information about
  1482. // the error.
  1483. //
  1484. // See the AWS API reference guide for AWS Shield's
  1485. // API operation UpdateEmergencyContactSettings for usage and error information.
  1486. //
  1487. // Returned Error Codes:
  1488. // * ErrCodeInternalErrorException "InternalErrorException"
  1489. // Exception that indicates that a problem occurred with the service infrastructure.
  1490. // You can retry the request.
  1491. //
  1492. // * ErrCodeInvalidParameterException "InvalidParameterException"
  1493. // Exception that indicates that the parameters passed to the API are invalid.
  1494. //
  1495. // * ErrCodeOptimisticLockException "OptimisticLockException"
  1496. // Exception that indicates that the protection state has been modified by another
  1497. // client. You can retry the request.
  1498. //
  1499. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1500. // Exception indicating the specified resource does not exist.
  1501. //
  1502. // See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/UpdateEmergencyContactSettings
  1503. func (c *Shield) UpdateEmergencyContactSettings(input *UpdateEmergencyContactSettingsInput) (*UpdateEmergencyContactSettingsOutput, error) {
  1504. req, out := c.UpdateEmergencyContactSettingsRequest(input)
  1505. return out, req.Send()
  1506. }
  1507. // UpdateEmergencyContactSettingsWithContext is the same as UpdateEmergencyContactSettings with the addition of
  1508. // the ability to pass a context and additional request options.
  1509. //
  1510. // See UpdateEmergencyContactSettings for details on how to use this API operation.
  1511. //
  1512. // The context must be non-nil and will be used for request cancellation. If
  1513. // the context is nil a panic will occur. In the future the SDK may create
  1514. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1515. // for more information on using Contexts.
  1516. func (c *Shield) UpdateEmergencyContactSettingsWithContext(ctx aws.Context, input *UpdateEmergencyContactSettingsInput, opts ...request.Option) (*UpdateEmergencyContactSettingsOutput, error) {
  1517. req, out := c.UpdateEmergencyContactSettingsRequest(input)
  1518. req.SetContext(ctx)
  1519. req.ApplyOptions(opts...)
  1520. return out, req.Send()
  1521. }
  1522. const opUpdateSubscription = "UpdateSubscription"
  1523. // UpdateSubscriptionRequest generates a "aws/request.Request" representing the
  1524. // client's request for the UpdateSubscription operation. The "output" return
  1525. // value will be populated with the request's response once the request completes
  1526. // successfully.
  1527. //
  1528. // Use "Send" method on the returned Request to send the API call to the service.
  1529. // the "output" return value is not valid until after Send returns without error.
  1530. //
  1531. // See UpdateSubscription for more information on using the UpdateSubscription
  1532. // API call, and error handling.
  1533. //
  1534. // This method is useful when you want to inject custom logic or configuration
  1535. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1536. //
  1537. //
  1538. // // Example sending a request using the UpdateSubscriptionRequest method.
  1539. // req, resp := client.UpdateSubscriptionRequest(params)
  1540. //
  1541. // err := req.Send()
  1542. // if err == nil { // resp is now filled
  1543. // fmt.Println(resp)
  1544. // }
  1545. //
  1546. // See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/UpdateSubscription
  1547. func (c *Shield) UpdateSubscriptionRequest(input *UpdateSubscriptionInput) (req *request.Request, output *UpdateSubscriptionOutput) {
  1548. op := &request.Operation{
  1549. Name: opUpdateSubscription,
  1550. HTTPMethod: "POST",
  1551. HTTPPath: "/",
  1552. }
  1553. if input == nil {
  1554. input = &UpdateSubscriptionInput{}
  1555. }
  1556. output = &UpdateSubscriptionOutput{}
  1557. req = c.newRequest(op, input, output)
  1558. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1559. return
  1560. }
  1561. // UpdateSubscription API operation for AWS Shield.
  1562. //
  1563. // Updates the details of an existing subscription. Only enter values for parameters
  1564. // you want to change. Empty parameters are not updated.
  1565. //
  1566. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1567. // with awserr.Error's Code and Message methods to get detailed information about
  1568. // the error.
  1569. //
  1570. // See the AWS API reference guide for AWS Shield's
  1571. // API operation UpdateSubscription for usage and error information.
  1572. //
  1573. // Returned Error Codes:
  1574. // * ErrCodeInternalErrorException "InternalErrorException"
  1575. // Exception that indicates that a problem occurred with the service infrastructure.
  1576. // You can retry the request.
  1577. //
  1578. // * ErrCodeLockedSubscriptionException "LockedSubscriptionException"
  1579. // You are trying to update a subscription that has not yet completed the 1-year
  1580. // commitment. You can change the AutoRenew parameter during the last 30 days
  1581. // of your subscription. This exception indicates that you are attempting to
  1582. // change AutoRenew prior to that period.
  1583. //
  1584. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1585. // Exception indicating the specified resource does not exist.
  1586. //
  1587. // * ErrCodeInvalidParameterException "InvalidParameterException"
  1588. // Exception that indicates that the parameters passed to the API are invalid.
  1589. //
  1590. // * ErrCodeOptimisticLockException "OptimisticLockException"
  1591. // Exception that indicates that the protection state has been modified by another
  1592. // client. You can retry the request.
  1593. //
  1594. // See also, https://docs.aws.amazon.com/goto/WebAPI/shield-2016-06-02/UpdateSubscription
  1595. func (c *Shield) UpdateSubscription(input *UpdateSubscriptionInput) (*UpdateSubscriptionOutput, error) {
  1596. req, out := c.UpdateSubscriptionRequest(input)
  1597. return out, req.Send()
  1598. }
  1599. // UpdateSubscriptionWithContext is the same as UpdateSubscription with the addition of
  1600. // the ability to pass a context and additional request options.
  1601. //
  1602. // See UpdateSubscription for details on how to use this API operation.
  1603. //
  1604. // The context must be non-nil and will be used for request cancellation. If
  1605. // the context is nil a panic will occur. In the future the SDK may create
  1606. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1607. // for more information on using Contexts.
  1608. func (c *Shield) UpdateSubscriptionWithContext(ctx aws.Context, input *UpdateSubscriptionInput, opts ...request.Option) (*UpdateSubscriptionOutput, error) {
  1609. req, out := c.UpdateSubscriptionRequest(input)
  1610. req.SetContext(ctx)
  1611. req.ApplyOptions(opts...)
  1612. return out, req.Send()
  1613. }
  1614. type AssociateDRTLogBucketInput struct {
  1615. _ struct{} `type:"structure"`
  1616. // The Amazon S3 bucket that contains your flow logs.
  1617. //
  1618. // LogBucket is a required field
  1619. LogBucket *string `min:"3" type:"string" required:"true"`
  1620. }
  1621. // String returns the string representation
  1622. func (s AssociateDRTLogBucketInput) String() string {
  1623. return awsutil.Prettify(s)
  1624. }
  1625. // GoString returns the string representation
  1626. func (s AssociateDRTLogBucketInput) GoString() string {
  1627. return s.String()
  1628. }
  1629. // Validate inspects the fields of the type to determine if they are valid.
  1630. func (s *AssociateDRTLogBucketInput) Validate() error {
  1631. invalidParams := request.ErrInvalidParams{Context: "AssociateDRTLogBucketInput"}
  1632. if s.LogBucket == nil {
  1633. invalidParams.Add(request.NewErrParamRequired("LogBucket"))
  1634. }
  1635. if s.LogBucket != nil && len(*s.LogBucket) < 3 {
  1636. invalidParams.Add(request.NewErrParamMinLen("LogBucket", 3))
  1637. }
  1638. if invalidParams.Len() > 0 {
  1639. return invalidParams
  1640. }
  1641. return nil
  1642. }
  1643. // SetLogBucket sets the LogBucket field's value.
  1644. func (s *AssociateDRTLogBucketInput) SetLogBucket(v string) *AssociateDRTLogBucketInput {
  1645. s.LogBucket = &v
  1646. return s
  1647. }
  1648. type AssociateDRTLogBucketOutput struct {
  1649. _ struct{} `type:"structure"`
  1650. }
  1651. // String returns the string representation
  1652. func (s AssociateDRTLogBucketOutput) String() string {
  1653. return awsutil.Prettify(s)
  1654. }
  1655. // GoString returns the string representation
  1656. func (s AssociateDRTLogBucketOutput) GoString() string {
  1657. return s.String()
  1658. }
  1659. type AssociateDRTRoleInput struct {
  1660. _ struct{} `type:"structure"`
  1661. // The Amazon Resource Name (ARN) of the role the DRT will use to access your
  1662. // AWS account.
  1663. //
  1664. // Prior to making the AssociateDRTRole request, you must attach the AWSShieldDRTAccessPolicy
  1665. // (https://console.aws.amazon.com/iam/home?#/policies/arn:aws:iam::aws:policy/service-role/AWSShieldDRTAccessPolicy)
  1666. // managed policy to this role. For more information see Attaching and Detaching
  1667. // IAM Policies ( https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_manage-attach-detach.html).
  1668. //
  1669. // RoleArn is a required field
  1670. RoleArn *string `min:"1" type:"string" required:"true"`
  1671. }
  1672. // String returns the string representation
  1673. func (s AssociateDRTRoleInput) String() string {
  1674. return awsutil.Prettify(s)
  1675. }
  1676. // GoString returns the string representation
  1677. func (s AssociateDRTRoleInput) GoString() string {
  1678. return s.String()
  1679. }
  1680. // Validate inspects the fields of the type to determine if they are valid.
  1681. func (s *AssociateDRTRoleInput) Validate() error {
  1682. invalidParams := request.ErrInvalidParams{Context: "AssociateDRTRoleInput"}
  1683. if s.RoleArn == nil {
  1684. invalidParams.Add(request.NewErrParamRequired("RoleArn"))
  1685. }
  1686. if s.RoleArn != nil && len(*s.RoleArn) < 1 {
  1687. invalidParams.Add(request.NewErrParamMinLen("RoleArn", 1))
  1688. }
  1689. if invalidParams.Len() > 0 {
  1690. return invalidParams
  1691. }
  1692. return nil
  1693. }
  1694. // SetRoleArn sets the RoleArn field's value.
  1695. func (s *AssociateDRTRoleInput) SetRoleArn(v string) *AssociateDRTRoleInput {
  1696. s.RoleArn = &v
  1697. return s
  1698. }
  1699. type AssociateDRTRoleOutput struct {
  1700. _ struct{} `type:"structure"`
  1701. }
  1702. // String returns the string representation
  1703. func (s AssociateDRTRoleOutput) String() string {
  1704. return awsutil.Prettify(s)
  1705. }
  1706. // GoString returns the string representation
  1707. func (s AssociateDRTRoleOutput) GoString() string {
  1708. return s.String()
  1709. }
  1710. // The details of a DDoS attack.
  1711. type AttackDetail struct {
  1712. _ struct{} `type:"structure"`
  1713. // List of counters that describe the attack for the specified time period.
  1714. AttackCounters []*SummarizedCounter `type:"list"`
  1715. // The unique identifier (ID) of the attack.
  1716. AttackId *string `min:"1" type:"string"`
  1717. // The array of AttackProperty objects.
  1718. AttackProperties []*AttackProperty `type:"list"`
  1719. // The time the attack ended, in Unix time in seconds. For more information
  1720. // see timestamp (http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#parameter-types).
  1721. EndTime *time.Time `type:"timestamp"`
  1722. // List of mitigation actions taken for the attack.
  1723. Mitigations []*Mitigation `type:"list"`
  1724. // The ARN (Amazon Resource Name) of the resource that was attacked.
  1725. ResourceArn *string `min:"1" type:"string"`
  1726. // The time the attack started, in Unix time in seconds. For more information
  1727. // see timestamp (http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#parameter-types).
  1728. StartTime *time.Time `type:"timestamp"`
  1729. // If applicable, additional detail about the resource being attacked, for example,
  1730. // IP address or URL.
  1731. SubResources []*SubResourceSummary `type:"list"`
  1732. }
  1733. // String returns the string representation
  1734. func (s AttackDetail) String() string {
  1735. return awsutil.Prettify(s)
  1736. }
  1737. // GoString returns the string representation
  1738. func (s AttackDetail) GoString() string {
  1739. return s.String()
  1740. }
  1741. // SetAttackCounters sets the AttackCounters field's value.
  1742. func (s *AttackDetail) SetAttackCounters(v []*SummarizedCounter) *AttackDetail {
  1743. s.AttackCounters = v
  1744. return s
  1745. }
  1746. // SetAttackId sets the AttackId field's value.
  1747. func (s *AttackDetail) SetAttackId(v string) *AttackDetail {
  1748. s.AttackId = &v
  1749. return s
  1750. }
  1751. // SetAttackProperties sets the AttackProperties field's value.
  1752. func (s *AttackDetail) SetAttackProperties(v []*AttackProperty) *AttackDetail {
  1753. s.AttackProperties = v
  1754. return s
  1755. }
  1756. // SetEndTime sets the EndTime field's value.
  1757. func (s *AttackDetail) SetEndTime(v time.Time) *AttackDetail {
  1758. s.EndTime = &v
  1759. return s
  1760. }
  1761. // SetMitigations sets the Mitigations field's value.
  1762. func (s *AttackDetail) SetMitigations(v []*Mitigation) *AttackDetail {
  1763. s.Mitigations = v
  1764. return s
  1765. }
  1766. // SetResourceArn sets the ResourceArn field's value.
  1767. func (s *AttackDetail) SetResourceArn(v string) *AttackDetail {
  1768. s.ResourceArn = &v
  1769. return s
  1770. }
  1771. // SetStartTime sets the StartTime field's value.
  1772. func (s *AttackDetail) SetStartTime(v time.Time) *AttackDetail {
  1773. s.StartTime = &v
  1774. return s
  1775. }
  1776. // SetSubResources sets the SubResources field's value.
  1777. func (s *AttackDetail) SetSubResources(v []*SubResourceSummary) *AttackDetail {
  1778. s.SubResources = v
  1779. return s
  1780. }
  1781. // Details of the described attack.
  1782. type AttackProperty struct {
  1783. _ struct{} `type:"structure"`
  1784. // The type of DDoS event that was observed. NETWORK indicates layer 3 and layer
  1785. // 4 events and APPLICATION indicates layer 7 events.
  1786. AttackLayer *string `type:"string" enum:"AttackLayer"`
  1787. // Defines the DDoS attack property information that is provided.
  1788. AttackPropertyIdentifier *string `type:"string" enum:"AttackPropertyIdentifier"`
  1789. // The array of Contributor objects that includes the top five contributors
  1790. // to an attack.
  1791. TopContributors []*Contributor `type:"list"`
  1792. // The total contributions made to this attack by all contributors, not just
  1793. // the five listed in the TopContributors list.
  1794. Total *int64 `type:"long"`
  1795. // The unit of the Value of the contributions.
  1796. Unit *string `type:"string" enum:"Unit"`
  1797. }
  1798. // String returns the string representation
  1799. func (s AttackProperty) String() string {
  1800. return awsutil.Prettify(s)
  1801. }
  1802. // GoString returns the string representation
  1803. func (s AttackProperty) GoString() string {
  1804. return s.String()
  1805. }
  1806. // SetAttackLayer sets the AttackLayer field's value.
  1807. func (s *AttackProperty) SetAttackLayer(v string) *AttackProperty {
  1808. s.AttackLayer = &v
  1809. return s
  1810. }
  1811. // SetAttackPropertyIdentifier sets the AttackPropertyIdentifier field's value.
  1812. func (s *AttackProperty) SetAttackPropertyIdentifier(v string) *AttackProperty {
  1813. s.AttackPropertyIdentifier = &v
  1814. return s
  1815. }
  1816. // SetTopContributors sets the TopContributors field's value.
  1817. func (s *AttackProperty) SetTopContributors(v []*Contributor) *AttackProperty {
  1818. s.TopContributors = v
  1819. return s
  1820. }
  1821. // SetTotal sets the Total field's value.
  1822. func (s *AttackProperty) SetTotal(v int64) *AttackProperty {
  1823. s.Total = &v
  1824. return s
  1825. }
  1826. // SetUnit sets the Unit field's value.
  1827. func (s *AttackProperty) SetUnit(v string) *AttackProperty {
  1828. s.Unit = &v
  1829. return s
  1830. }
  1831. // Summarizes all DDoS attacks for a specified time period.
  1832. type AttackSummary struct {
  1833. _ struct{} `type:"structure"`
  1834. // The unique identifier (ID) of the attack.
  1835. AttackId *string `type:"string"`
  1836. // The list of attacks for a specified time period.
  1837. AttackVectors []*AttackVectorDescription `type:"list"`
  1838. // The end time of the attack, in Unix time in seconds. For more information
  1839. // see timestamp (http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#parameter-types).
  1840. EndTime *time.Time `type:"timestamp"`
  1841. // The ARN (Amazon Resource Name) of the resource that was attacked.
  1842. ResourceArn *string `type:"string"`
  1843. // The start time of the attack, in Unix time in seconds. For more information
  1844. // see timestamp (http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#parameter-types).
  1845. StartTime *time.Time `type:"timestamp"`
  1846. }
  1847. // String returns the string representation
  1848. func (s AttackSummary) String() string {
  1849. return awsutil.Prettify(s)
  1850. }
  1851. // GoString returns the string representation
  1852. func (s AttackSummary) GoString() string {
  1853. return s.String()
  1854. }
  1855. // SetAttackId sets the AttackId field's value.
  1856. func (s *AttackSummary) SetAttackId(v string) *AttackSummary {
  1857. s.AttackId = &v
  1858. return s
  1859. }
  1860. // SetAttackVectors sets the AttackVectors field's value.
  1861. func (s *AttackSummary) SetAttackVectors(v []*AttackVectorDescription) *AttackSummary {
  1862. s.AttackVectors = v
  1863. return s
  1864. }
  1865. // SetEndTime sets the EndTime field's value.
  1866. func (s *AttackSummary) SetEndTime(v time.Time) *AttackSummary {
  1867. s.EndTime = &v
  1868. return s
  1869. }
  1870. // SetResourceArn sets the ResourceArn field's value.
  1871. func (s *AttackSummary) SetResourceArn(v string) *AttackSummary {
  1872. s.ResourceArn = &v
  1873. return s
  1874. }
  1875. // SetStartTime sets the StartTime field's value.
  1876. func (s *AttackSummary) SetStartTime(v time.Time) *AttackSummary {
  1877. s.StartTime = &v
  1878. return s
  1879. }
  1880. // Describes the attack.
  1881. type AttackVectorDescription struct {
  1882. _ struct{} `type:"structure"`
  1883. // The attack type. Valid values:
  1884. //
  1885. // * UDP_TRAFFIC
  1886. //
  1887. // * UDP_FRAGMENT
  1888. //
  1889. // * GENERIC_UDP_REFLECTION
  1890. //
  1891. // * DNS_REFLECTION
  1892. //
  1893. // * NTP_REFLECTION
  1894. //
  1895. // * CHARGEN_REFLECTION
  1896. //
  1897. // * SSDP_REFLECTION
  1898. //
  1899. // * PORT_MAPPER
  1900. //
  1901. // * RIP_REFLECTION
  1902. //
  1903. // * SNMP_REFLECTION
  1904. //
  1905. // * MSSQL_REFLECTION
  1906. //
  1907. // * NET_BIOS_REFLECTION
  1908. //
  1909. // * SYN_FLOOD
  1910. //
  1911. // * ACK_FLOOD
  1912. //
  1913. // * REQUEST_FLOOD
  1914. //
  1915. // VectorType is a required field
  1916. VectorType *string `type:"string" required:"true"`
  1917. }
  1918. // String returns the string representation
  1919. func (s AttackVectorDescription) String() string {
  1920. return awsutil.Prettify(s)
  1921. }
  1922. // GoString returns the string representation
  1923. func (s AttackVectorDescription) GoString() string {
  1924. return s.String()
  1925. }
  1926. // SetVectorType sets the VectorType field's value.
  1927. func (s *AttackVectorDescription) SetVectorType(v string) *AttackVectorDescription {
  1928. s.VectorType = &v
  1929. return s
  1930. }
  1931. // A contributor to the attack and their contribution.
  1932. type Contributor struct {
  1933. _ struct{} `type:"structure"`
  1934. // The name of the contributor. This is dependent on the AttackPropertyIdentifier.
  1935. // For example, if the AttackPropertyIdentifier is SOURCE_COUNTRY, the Name
  1936. // could be United States.
  1937. Name *string `type:"string"`
  1938. // The contribution of this contributor expressed in Protection units. For example
  1939. // 10,000.
  1940. Value *int64 `type:"long"`
  1941. }
  1942. // String returns the string representation
  1943. func (s Contributor) String() string {
  1944. return awsutil.Prettify(s)
  1945. }
  1946. // GoString returns the string representation
  1947. func (s Contributor) GoString() string {
  1948. return s.String()
  1949. }
  1950. // SetName sets the Name field's value.
  1951. func (s *Contributor) SetName(v string) *Contributor {
  1952. s.Name = &v
  1953. return s
  1954. }
  1955. // SetValue sets the Value field's value.
  1956. func (s *Contributor) SetValue(v int64) *Contributor {
  1957. s.Value = &v
  1958. return s
  1959. }
  1960. type CreateProtectionInput struct {
  1961. _ struct{} `type:"structure"`
  1962. // Friendly name for the Protection you are creating.
  1963. //
  1964. // Name is a required field
  1965. Name *string `min:"1" type:"string" required:"true"`
  1966. // The ARN (Amazon Resource Name) of the resource to be protected.
  1967. //
  1968. // The ARN should be in one of the following formats:
  1969. //
  1970. // * For an Application Load Balancer: arn:aws:elasticloadbalancing:region:account-id:loadbalancer/app/load-balancer-name/load-balancer-id
  1971. //
  1972. // * For an Elastic Load Balancer (Classic Load Balancer): arn:aws:elasticloadbalancing:region:account-id:loadbalancer/load-balancer-name
  1973. //
  1974. // * For AWS CloudFront distribution: arn:aws:cloudfront::account-id:distribution/distribution-id
  1975. //
  1976. // * For Amazon Route 53: arn:aws:route53:::hostedzone/hosted-zone-id
  1977. //
  1978. // * For an Elastic IP address: arn:aws:ec2:region:account-id:eip-allocation/allocation-id
  1979. //
  1980. // ResourceArn is a required field
  1981. ResourceArn *string `min:"1" type:"string" required:"true"`
  1982. }
  1983. // String returns the string representation
  1984. func (s CreateProtectionInput) String() string {
  1985. return awsutil.Prettify(s)
  1986. }
  1987. // GoString returns the string representation
  1988. func (s CreateProtectionInput) GoString() string {
  1989. return s.String()
  1990. }
  1991. // Validate inspects the fields of the type to determine if they are valid.
  1992. func (s *CreateProtectionInput) Validate() error {
  1993. invalidParams := request.ErrInvalidParams{Context: "CreateProtectionInput"}
  1994. if s.Name == nil {
  1995. invalidParams.Add(request.NewErrParamRequired("Name"))
  1996. }
  1997. if s.Name != nil && len(*s.Name) < 1 {
  1998. invalidParams.Add(request.NewErrParamMinLen("Name", 1))
  1999. }
  2000. if s.ResourceArn == nil {
  2001. invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
  2002. }
  2003. if s.ResourceArn != nil && len(*s.ResourceArn) < 1 {
  2004. invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1))
  2005. }
  2006. if invalidParams.Len() > 0 {
  2007. return invalidParams
  2008. }
  2009. return nil
  2010. }
  2011. // SetName sets the Name field's value.
  2012. func (s *CreateProtectionInput) SetName(v string) *CreateProtectionInput {
  2013. s.Name = &v
  2014. return s
  2015. }
  2016. // SetResourceArn sets the ResourceArn field's value.
  2017. func (s *CreateProtectionInput) SetResourceArn(v string) *CreateProtectionInput {
  2018. s.ResourceArn = &v
  2019. return s
  2020. }
  2021. type CreateProtectionOutput struct {
  2022. _ struct{} `type:"structure"`
  2023. // The unique identifier (ID) for the Protection object that is created.
  2024. ProtectionId *string `min:"1" type:"string"`
  2025. }
  2026. // String returns the string representation
  2027. func (s CreateProtectionOutput) String() string {
  2028. return awsutil.Prettify(s)
  2029. }
  2030. // GoString returns the string representation
  2031. func (s CreateProtectionOutput) GoString() string {
  2032. return s.String()
  2033. }
  2034. // SetProtectionId sets the ProtectionId field's value.
  2035. func (s *CreateProtectionOutput) SetProtectionId(v string) *CreateProtectionOutput {
  2036. s.ProtectionId = &v
  2037. return s
  2038. }
  2039. type CreateSubscriptionInput struct {
  2040. _ struct{} `type:"structure"`
  2041. }
  2042. // String returns the string representation
  2043. func (s CreateSubscriptionInput) String() string {
  2044. return awsutil.Prettify(s)
  2045. }
  2046. // GoString returns the string representation
  2047. func (s CreateSubscriptionInput) GoString() string {
  2048. return s.String()
  2049. }
  2050. type CreateSubscriptionOutput struct {
  2051. _ struct{} `type:"structure"`
  2052. }
  2053. // String returns the string representation
  2054. func (s CreateSubscriptionOutput) String() string {
  2055. return awsutil.Prettify(s)
  2056. }
  2057. // GoString returns the string representation
  2058. func (s CreateSubscriptionOutput) GoString() string {
  2059. return s.String()
  2060. }
  2061. type DeleteProtectionInput struct {
  2062. _ struct{} `type:"structure"`
  2063. // The unique identifier (ID) for the Protection object to be deleted.
  2064. //
  2065. // ProtectionId is a required field
  2066. ProtectionId *string `min:"1" type:"string" required:"true"`
  2067. }
  2068. // String returns the string representation
  2069. func (s DeleteProtectionInput) String() string {
  2070. return awsutil.Prettify(s)
  2071. }
  2072. // GoString returns the string representation
  2073. func (s DeleteProtectionInput) GoString() string {
  2074. return s.String()
  2075. }
  2076. // Validate inspects the fields of the type to determine if they are valid.
  2077. func (s *DeleteProtectionInput) Validate() error {
  2078. invalidParams := request.ErrInvalidParams{Context: "DeleteProtectionInput"}
  2079. if s.ProtectionId == nil {
  2080. invalidParams.Add(request.NewErrParamRequired("ProtectionId"))
  2081. }
  2082. if s.ProtectionId != nil && len(*s.ProtectionId) < 1 {
  2083. invalidParams.Add(request.NewErrParamMinLen("ProtectionId", 1))
  2084. }
  2085. if invalidParams.Len() > 0 {
  2086. return invalidParams
  2087. }
  2088. return nil
  2089. }
  2090. // SetProtectionId sets the ProtectionId field's value.
  2091. func (s *DeleteProtectionInput) SetProtectionId(v string) *DeleteProtectionInput {
  2092. s.ProtectionId = &v
  2093. return s
  2094. }
  2095. type DeleteProtectionOutput struct {
  2096. _ struct{} `type:"structure"`
  2097. }
  2098. // String returns the string representation
  2099. func (s DeleteProtectionOutput) String() string {
  2100. return awsutil.Prettify(s)
  2101. }
  2102. // GoString returns the string representation
  2103. func (s DeleteProtectionOutput) GoString() string {
  2104. return s.String()
  2105. }
  2106. // Deprecated: DeleteSubscriptionInput has been deprecated
  2107. type DeleteSubscriptionInput struct {
  2108. _ struct{} `deprecated:"true" type:"structure"`
  2109. }
  2110. // String returns the string representation
  2111. func (s DeleteSubscriptionInput) String() string {
  2112. return awsutil.Prettify(s)
  2113. }
  2114. // GoString returns the string representation
  2115. func (s DeleteSubscriptionInput) GoString() string {
  2116. return s.String()
  2117. }
  2118. // Deprecated: DeleteSubscriptionOutput has been deprecated
  2119. type DeleteSubscriptionOutput struct {
  2120. _ struct{} `deprecated:"true" type:"structure"`
  2121. }
  2122. // String returns the string representation
  2123. func (s DeleteSubscriptionOutput) String() string {
  2124. return awsutil.Prettify(s)
  2125. }
  2126. // GoString returns the string representation
  2127. func (s DeleteSubscriptionOutput) GoString() string {
  2128. return s.String()
  2129. }
  2130. type DescribeAttackInput struct {
  2131. _ struct{} `type:"structure"`
  2132. // The unique identifier (ID) for the attack that to be described.
  2133. //
  2134. // AttackId is a required field
  2135. AttackId *string `min:"1" type:"string" required:"true"`
  2136. }
  2137. // String returns the string representation
  2138. func (s DescribeAttackInput) String() string {
  2139. return awsutil.Prettify(s)
  2140. }
  2141. // GoString returns the string representation
  2142. func (s DescribeAttackInput) GoString() string {
  2143. return s.String()
  2144. }
  2145. // Validate inspects the fields of the type to determine if they are valid.
  2146. func (s *DescribeAttackInput) Validate() error {
  2147. invalidParams := request.ErrInvalidParams{Context: "DescribeAttackInput"}
  2148. if s.AttackId == nil {
  2149. invalidParams.Add(request.NewErrParamRequired("AttackId"))
  2150. }
  2151. if s.AttackId != nil && len(*s.AttackId) < 1 {
  2152. invalidParams.Add(request.NewErrParamMinLen("AttackId", 1))
  2153. }
  2154. if invalidParams.Len() > 0 {
  2155. return invalidParams
  2156. }
  2157. return nil
  2158. }
  2159. // SetAttackId sets the AttackId field's value.
  2160. func (s *DescribeAttackInput) SetAttackId(v string) *DescribeAttackInput {
  2161. s.AttackId = &v
  2162. return s
  2163. }
  2164. type DescribeAttackOutput struct {
  2165. _ struct{} `type:"structure"`
  2166. // The attack that is described.
  2167. Attack *AttackDetail `type:"structure"`
  2168. }
  2169. // String returns the string representation
  2170. func (s DescribeAttackOutput) String() string {
  2171. return awsutil.Prettify(s)
  2172. }
  2173. // GoString returns the string representation
  2174. func (s DescribeAttackOutput) GoString() string {
  2175. return s.String()
  2176. }
  2177. // SetAttack sets the Attack field's value.
  2178. func (s *DescribeAttackOutput) SetAttack(v *AttackDetail) *DescribeAttackOutput {
  2179. s.Attack = v
  2180. return s
  2181. }
  2182. type DescribeDRTAccessInput struct {
  2183. _ struct{} `type:"structure"`
  2184. }
  2185. // String returns the string representation
  2186. func (s DescribeDRTAccessInput) String() string {
  2187. return awsutil.Prettify(s)
  2188. }
  2189. // GoString returns the string representation
  2190. func (s DescribeDRTAccessInput) GoString() string {
  2191. return s.String()
  2192. }
  2193. type DescribeDRTAccessOutput struct {
  2194. _ struct{} `type:"structure"`
  2195. // The list of Amazon S3 buckets accessed by the DRT.
  2196. LogBucketList []*string `type:"list"`
  2197. // The Amazon Resource Name (ARN) of the role the DRT used to access your AWS
  2198. // account.
  2199. RoleArn *string `min:"1" type:"string"`
  2200. }
  2201. // String returns the string representation
  2202. func (s DescribeDRTAccessOutput) String() string {
  2203. return awsutil.Prettify(s)
  2204. }
  2205. // GoString returns the string representation
  2206. func (s DescribeDRTAccessOutput) GoString() string {
  2207. return s.String()
  2208. }
  2209. // SetLogBucketList sets the LogBucketList field's value.
  2210. func (s *DescribeDRTAccessOutput) SetLogBucketList(v []*string) *DescribeDRTAccessOutput {
  2211. s.LogBucketList = v
  2212. return s
  2213. }
  2214. // SetRoleArn sets the RoleArn field's value.
  2215. func (s *DescribeDRTAccessOutput) SetRoleArn(v string) *DescribeDRTAccessOutput {
  2216. s.RoleArn = &v
  2217. return s
  2218. }
  2219. type DescribeEmergencyContactSettingsInput struct {
  2220. _ struct{} `type:"structure"`
  2221. }
  2222. // String returns the string representation
  2223. func (s DescribeEmergencyContactSettingsInput) String() string {
  2224. return awsutil.Prettify(s)
  2225. }
  2226. // GoString returns the string representation
  2227. func (s DescribeEmergencyContactSettingsInput) GoString() string {
  2228. return s.String()
  2229. }
  2230. type DescribeEmergencyContactSettingsOutput struct {
  2231. _ struct{} `type:"structure"`
  2232. // A list of email addresses that the DRT can use to contact you during a suspected
  2233. // attack.
  2234. EmergencyContactList []*EmergencyContact `type:"list"`
  2235. }
  2236. // String returns the string representation
  2237. func (s DescribeEmergencyContactSettingsOutput) String() string {
  2238. return awsutil.Prettify(s)
  2239. }
  2240. // GoString returns the string representation
  2241. func (s DescribeEmergencyContactSettingsOutput) GoString() string {
  2242. return s.String()
  2243. }
  2244. // SetEmergencyContactList sets the EmergencyContactList field's value.
  2245. func (s *DescribeEmergencyContactSettingsOutput) SetEmergencyContactList(v []*EmergencyContact) *DescribeEmergencyContactSettingsOutput {
  2246. s.EmergencyContactList = v
  2247. return s
  2248. }
  2249. type DescribeProtectionInput struct {
  2250. _ struct{} `type:"structure"`
  2251. // The unique identifier (ID) for the Protection object that is described.
  2252. //
  2253. // ProtectionId is a required field
  2254. ProtectionId *string `min:"1" type:"string" required:"true"`
  2255. }
  2256. // String returns the string representation
  2257. func (s DescribeProtectionInput) String() string {
  2258. return awsutil.Prettify(s)
  2259. }
  2260. // GoString returns the string representation
  2261. func (s DescribeProtectionInput) GoString() string {
  2262. return s.String()
  2263. }
  2264. // Validate inspects the fields of the type to determine if they are valid.
  2265. func (s *DescribeProtectionInput) Validate() error {
  2266. invalidParams := request.ErrInvalidParams{Context: "DescribeProtectionInput"}
  2267. if s.ProtectionId == nil {
  2268. invalidParams.Add(request.NewErrParamRequired("ProtectionId"))
  2269. }
  2270. if s.ProtectionId != nil && len(*s.ProtectionId) < 1 {
  2271. invalidParams.Add(request.NewErrParamMinLen("ProtectionId", 1))
  2272. }
  2273. if invalidParams.Len() > 0 {
  2274. return invalidParams
  2275. }
  2276. return nil
  2277. }
  2278. // SetProtectionId sets the ProtectionId field's value.
  2279. func (s *DescribeProtectionInput) SetProtectionId(v string) *DescribeProtectionInput {
  2280. s.ProtectionId = &v
  2281. return s
  2282. }
  2283. type DescribeProtectionOutput struct {
  2284. _ struct{} `type:"structure"`
  2285. // The Protection object that is described.
  2286. Protection *Protection `type:"structure"`
  2287. }
  2288. // String returns the string representation
  2289. func (s DescribeProtectionOutput) String() string {
  2290. return awsutil.Prettify(s)
  2291. }
  2292. // GoString returns the string representation
  2293. func (s DescribeProtectionOutput) GoString() string {
  2294. return s.String()
  2295. }
  2296. // SetProtection sets the Protection field's value.
  2297. func (s *DescribeProtectionOutput) SetProtection(v *Protection) *DescribeProtectionOutput {
  2298. s.Protection = v
  2299. return s
  2300. }
  2301. type DescribeSubscriptionInput struct {
  2302. _ struct{} `type:"structure"`
  2303. }
  2304. // String returns the string representation
  2305. func (s DescribeSubscriptionInput) String() string {
  2306. return awsutil.Prettify(s)
  2307. }
  2308. // GoString returns the string representation
  2309. func (s DescribeSubscriptionInput) GoString() string {
  2310. return s.String()
  2311. }
  2312. type DescribeSubscriptionOutput struct {
  2313. _ struct{} `type:"structure"`
  2314. // The AWS Shield Advanced subscription details for an account.
  2315. Subscription *Subscription `type:"structure"`
  2316. }
  2317. // String returns the string representation
  2318. func (s DescribeSubscriptionOutput) String() string {
  2319. return awsutil.Prettify(s)
  2320. }
  2321. // GoString returns the string representation
  2322. func (s DescribeSubscriptionOutput) GoString() string {
  2323. return s.String()
  2324. }
  2325. // SetSubscription sets the Subscription field's value.
  2326. func (s *DescribeSubscriptionOutput) SetSubscription(v *Subscription) *DescribeSubscriptionOutput {
  2327. s.Subscription = v
  2328. return s
  2329. }
  2330. type DisassociateDRTLogBucketInput struct {
  2331. _ struct{} `type:"structure"`
  2332. // The Amazon S3 bucket that contains your flow logs.
  2333. //
  2334. // LogBucket is a required field
  2335. LogBucket *string `min:"3" type:"string" required:"true"`
  2336. }
  2337. // String returns the string representation
  2338. func (s DisassociateDRTLogBucketInput) String() string {
  2339. return awsutil.Prettify(s)
  2340. }
  2341. // GoString returns the string representation
  2342. func (s DisassociateDRTLogBucketInput) GoString() string {
  2343. return s.String()
  2344. }
  2345. // Validate inspects the fields of the type to determine if they are valid.
  2346. func (s *DisassociateDRTLogBucketInput) Validate() error {
  2347. invalidParams := request.ErrInvalidParams{Context: "DisassociateDRTLogBucketInput"}
  2348. if s.LogBucket == nil {
  2349. invalidParams.Add(request.NewErrParamRequired("LogBucket"))
  2350. }
  2351. if s.LogBucket != nil && len(*s.LogBucket) < 3 {
  2352. invalidParams.Add(request.NewErrParamMinLen("LogBucket", 3))
  2353. }
  2354. if invalidParams.Len() > 0 {
  2355. return invalidParams
  2356. }
  2357. return nil
  2358. }
  2359. // SetLogBucket sets the LogBucket field's value.
  2360. func (s *DisassociateDRTLogBucketInput) SetLogBucket(v string) *DisassociateDRTLogBucketInput {
  2361. s.LogBucket = &v
  2362. return s
  2363. }
  2364. type DisassociateDRTLogBucketOutput struct {
  2365. _ struct{} `type:"structure"`
  2366. }
  2367. // String returns the string representation
  2368. func (s DisassociateDRTLogBucketOutput) String() string {
  2369. return awsutil.Prettify(s)
  2370. }
  2371. // GoString returns the string representation
  2372. func (s DisassociateDRTLogBucketOutput) GoString() string {
  2373. return s.String()
  2374. }
  2375. type DisassociateDRTRoleInput struct {
  2376. _ struct{} `type:"structure"`
  2377. }
  2378. // String returns the string representation
  2379. func (s DisassociateDRTRoleInput) String() string {
  2380. return awsutil.Prettify(s)
  2381. }
  2382. // GoString returns the string representation
  2383. func (s DisassociateDRTRoleInput) GoString() string {
  2384. return s.String()
  2385. }
  2386. type DisassociateDRTRoleOutput struct {
  2387. _ struct{} `type:"structure"`
  2388. }
  2389. // String returns the string representation
  2390. func (s DisassociateDRTRoleOutput) String() string {
  2391. return awsutil.Prettify(s)
  2392. }
  2393. // GoString returns the string representation
  2394. func (s DisassociateDRTRoleOutput) GoString() string {
  2395. return s.String()
  2396. }
  2397. // Contact information that the DRT can use to contact you during a suspected
  2398. // attack.
  2399. type EmergencyContact struct {
  2400. _ struct{} `type:"structure"`
  2401. // An email address that the DRT can use to contact you during a suspected attack.
  2402. //
  2403. // EmailAddress is a required field
  2404. EmailAddress *string `min:"1" type:"string" required:"true"`
  2405. }
  2406. // String returns the string representation
  2407. func (s EmergencyContact) String() string {
  2408. return awsutil.Prettify(s)
  2409. }
  2410. // GoString returns the string representation
  2411. func (s EmergencyContact) GoString() string {
  2412. return s.String()
  2413. }
  2414. // Validate inspects the fields of the type to determine if they are valid.
  2415. func (s *EmergencyContact) Validate() error {
  2416. invalidParams := request.ErrInvalidParams{Context: "EmergencyContact"}
  2417. if s.EmailAddress == nil {
  2418. invalidParams.Add(request.NewErrParamRequired("EmailAddress"))
  2419. }
  2420. if s.EmailAddress != nil && len(*s.EmailAddress) < 1 {
  2421. invalidParams.Add(request.NewErrParamMinLen("EmailAddress", 1))
  2422. }
  2423. if invalidParams.Len() > 0 {
  2424. return invalidParams
  2425. }
  2426. return nil
  2427. }
  2428. // SetEmailAddress sets the EmailAddress field's value.
  2429. func (s *EmergencyContact) SetEmailAddress(v string) *EmergencyContact {
  2430. s.EmailAddress = &v
  2431. return s
  2432. }
  2433. type GetSubscriptionStateInput struct {
  2434. _ struct{} `type:"structure"`
  2435. }
  2436. // String returns the string representation
  2437. func (s GetSubscriptionStateInput) String() string {
  2438. return awsutil.Prettify(s)
  2439. }
  2440. // GoString returns the string representation
  2441. func (s GetSubscriptionStateInput) GoString() string {
  2442. return s.String()
  2443. }
  2444. type GetSubscriptionStateOutput struct {
  2445. _ struct{} `type:"structure"`
  2446. // The status of the subscription.
  2447. //
  2448. // SubscriptionState is a required field
  2449. SubscriptionState *string `type:"string" required:"true" enum:"SubscriptionState"`
  2450. }
  2451. // String returns the string representation
  2452. func (s GetSubscriptionStateOutput) String() string {
  2453. return awsutil.Prettify(s)
  2454. }
  2455. // GoString returns the string representation
  2456. func (s GetSubscriptionStateOutput) GoString() string {
  2457. return s.String()
  2458. }
  2459. // SetSubscriptionState sets the SubscriptionState field's value.
  2460. func (s *GetSubscriptionStateOutput) SetSubscriptionState(v string) *GetSubscriptionStateOutput {
  2461. s.SubscriptionState = &v
  2462. return s
  2463. }
  2464. // Specifies how many protections of a given type you can create.
  2465. type Limit struct {
  2466. _ struct{} `type:"structure"`
  2467. // The maximum number of protections that can be created for the specified Type.
  2468. Max *int64 `type:"long"`
  2469. // The type of protection.
  2470. Type *string `type:"string"`
  2471. }
  2472. // String returns the string representation
  2473. func (s Limit) String() string {
  2474. return awsutil.Prettify(s)
  2475. }
  2476. // GoString returns the string representation
  2477. func (s Limit) GoString() string {
  2478. return s.String()
  2479. }
  2480. // SetMax sets the Max field's value.
  2481. func (s *Limit) SetMax(v int64) *Limit {
  2482. s.Max = &v
  2483. return s
  2484. }
  2485. // SetType sets the Type field's value.
  2486. func (s *Limit) SetType(v string) *Limit {
  2487. s.Type = &v
  2488. return s
  2489. }
  2490. type ListAttacksInput struct {
  2491. _ struct{} `type:"structure"`
  2492. // The end of the time period for the attacks. This is a timestamp type. The
  2493. // sample request above indicates a number type because the default used by
  2494. // WAF is Unix time in seconds. However any valid timestamp format (http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#parameter-types)
  2495. // is allowed.
  2496. EndTime *TimeRange `type:"structure"`
  2497. // The maximum number of AttackSummary objects to be returned. If this is left
  2498. // blank, the first 20 results will be returned.
  2499. //
  2500. // This is a maximum value; it is possible that AWS WAF will return the results
  2501. // in smaller batches. That is, the number of AttackSummary objects returned
  2502. // could be less than MaxResults, even if there are still more AttackSummary
  2503. // objects yet to return. If there are more AttackSummary objects to return,
  2504. // AWS WAF will always also return a NextToken.
  2505. MaxResults *int64 `type:"integer"`
  2506. // The ListAttacksRequest.NextMarker value from a previous call to ListAttacksRequest.
  2507. // Pass null if this is the first call.
  2508. NextToken *string `min:"1" type:"string"`
  2509. // The ARN (Amazon Resource Name) of the resource that was attacked. If this
  2510. // is left blank, all applicable resources for this account will be included.
  2511. ResourceArns []*string `type:"list"`
  2512. // The start of the time period for the attacks. This is a timestamp type. The
  2513. // sample request above indicates a number type because the default used by
  2514. // WAF is Unix time in seconds. However any valid timestamp format (http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#parameter-types)
  2515. // is allowed.
  2516. StartTime *TimeRange `type:"structure"`
  2517. }
  2518. // String returns the string representation
  2519. func (s ListAttacksInput) String() string {
  2520. return awsutil.Prettify(s)
  2521. }
  2522. // GoString returns the string representation
  2523. func (s ListAttacksInput) GoString() string {
  2524. return s.String()
  2525. }
  2526. // Validate inspects the fields of the type to determine if they are valid.
  2527. func (s *ListAttacksInput) Validate() error {
  2528. invalidParams := request.ErrInvalidParams{Context: "ListAttacksInput"}
  2529. if s.NextToken != nil && len(*s.NextToken) < 1 {
  2530. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  2531. }
  2532. if invalidParams.Len() > 0 {
  2533. return invalidParams
  2534. }
  2535. return nil
  2536. }
  2537. // SetEndTime sets the EndTime field's value.
  2538. func (s *ListAttacksInput) SetEndTime(v *TimeRange) *ListAttacksInput {
  2539. s.EndTime = v
  2540. return s
  2541. }
  2542. // SetMaxResults sets the MaxResults field's value.
  2543. func (s *ListAttacksInput) SetMaxResults(v int64) *ListAttacksInput {
  2544. s.MaxResults = &v
  2545. return s
  2546. }
  2547. // SetNextToken sets the NextToken field's value.
  2548. func (s *ListAttacksInput) SetNextToken(v string) *ListAttacksInput {
  2549. s.NextToken = &v
  2550. return s
  2551. }
  2552. // SetResourceArns sets the ResourceArns field's value.
  2553. func (s *ListAttacksInput) SetResourceArns(v []*string) *ListAttacksInput {
  2554. s.ResourceArns = v
  2555. return s
  2556. }
  2557. // SetStartTime sets the StartTime field's value.
  2558. func (s *ListAttacksInput) SetStartTime(v *TimeRange) *ListAttacksInput {
  2559. s.StartTime = v
  2560. return s
  2561. }
  2562. type ListAttacksOutput struct {
  2563. _ struct{} `type:"structure"`
  2564. // The attack information for the specified time range.
  2565. AttackSummaries []*AttackSummary `type:"list"`
  2566. // The token returned by a previous call to indicate that there is more data
  2567. // available. If not null, more results are available. Pass this value for the
  2568. // NextMarker parameter in a subsequent call to ListAttacks to retrieve the
  2569. // next set of items.
  2570. //
  2571. // AWS WAF might return the list of AttackSummary objects in batches smaller
  2572. // than the number specified by MaxResults. If there are more AttackSummary
  2573. // objects to return, AWS WAF will always also return a NextToken.
  2574. NextToken *string `min:"1" type:"string"`
  2575. }
  2576. // String returns the string representation
  2577. func (s ListAttacksOutput) String() string {
  2578. return awsutil.Prettify(s)
  2579. }
  2580. // GoString returns the string representation
  2581. func (s ListAttacksOutput) GoString() string {
  2582. return s.String()
  2583. }
  2584. // SetAttackSummaries sets the AttackSummaries field's value.
  2585. func (s *ListAttacksOutput) SetAttackSummaries(v []*AttackSummary) *ListAttacksOutput {
  2586. s.AttackSummaries = v
  2587. return s
  2588. }
  2589. // SetNextToken sets the NextToken field's value.
  2590. func (s *ListAttacksOutput) SetNextToken(v string) *ListAttacksOutput {
  2591. s.NextToken = &v
  2592. return s
  2593. }
  2594. type ListProtectionsInput struct {
  2595. _ struct{} `type:"structure"`
  2596. // The maximum number of Protection objects to be returned. If this is left
  2597. // blank the first 20 results will be returned.
  2598. //
  2599. // This is a maximum value; it is possible that AWS WAF will return the results
  2600. // in smaller batches. That is, the number of Protection objects returned could
  2601. // be less than MaxResults, even if there are still more Protection objects
  2602. // yet to return. If there are more Protection objects to return, AWS WAF will
  2603. // always also return a NextToken.
  2604. MaxResults *int64 `type:"integer"`
  2605. // The ListProtectionsRequest.NextToken value from a previous call to ListProtections.
  2606. // Pass null if this is the first call.
  2607. NextToken *string `min:"1" type:"string"`
  2608. }
  2609. // String returns the string representation
  2610. func (s ListProtectionsInput) String() string {
  2611. return awsutil.Prettify(s)
  2612. }
  2613. // GoString returns the string representation
  2614. func (s ListProtectionsInput) GoString() string {
  2615. return s.String()
  2616. }
  2617. // Validate inspects the fields of the type to determine if they are valid.
  2618. func (s *ListProtectionsInput) Validate() error {
  2619. invalidParams := request.ErrInvalidParams{Context: "ListProtectionsInput"}
  2620. if s.NextToken != nil && len(*s.NextToken) < 1 {
  2621. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  2622. }
  2623. if invalidParams.Len() > 0 {
  2624. return invalidParams
  2625. }
  2626. return nil
  2627. }
  2628. // SetMaxResults sets the MaxResults field's value.
  2629. func (s *ListProtectionsInput) SetMaxResults(v int64) *ListProtectionsInput {
  2630. s.MaxResults = &v
  2631. return s
  2632. }
  2633. // SetNextToken sets the NextToken field's value.
  2634. func (s *ListProtectionsInput) SetNextToken(v string) *ListProtectionsInput {
  2635. s.NextToken = &v
  2636. return s
  2637. }
  2638. type ListProtectionsOutput struct {
  2639. _ struct{} `type:"structure"`
  2640. // If you specify a value for MaxResults and you have more Protections than
  2641. // the value of MaxResults, AWS Shield Advanced returns a NextToken value in
  2642. // the response that allows you to list another group of Protections. For the
  2643. // second and subsequent ListProtections requests, specify the value of NextToken
  2644. // from the previous response to get information about another batch of Protections.
  2645. //
  2646. // AWS WAF might return the list of Protection objects in batches smaller than
  2647. // the number specified by MaxResults. If there are more Protection objects
  2648. // to return, AWS WAF will always also return a NextToken.
  2649. NextToken *string `min:"1" type:"string"`
  2650. // The array of enabled Protection objects.
  2651. Protections []*Protection `type:"list"`
  2652. }
  2653. // String returns the string representation
  2654. func (s ListProtectionsOutput) String() string {
  2655. return awsutil.Prettify(s)
  2656. }
  2657. // GoString returns the string representation
  2658. func (s ListProtectionsOutput) GoString() string {
  2659. return s.String()
  2660. }
  2661. // SetNextToken sets the NextToken field's value.
  2662. func (s *ListProtectionsOutput) SetNextToken(v string) *ListProtectionsOutput {
  2663. s.NextToken = &v
  2664. return s
  2665. }
  2666. // SetProtections sets the Protections field's value.
  2667. func (s *ListProtectionsOutput) SetProtections(v []*Protection) *ListProtectionsOutput {
  2668. s.Protections = v
  2669. return s
  2670. }
  2671. // The mitigation applied to a DDoS attack.
  2672. type Mitigation struct {
  2673. _ struct{} `type:"structure"`
  2674. // The name of the mitigation taken for this attack.
  2675. MitigationName *string `type:"string"`
  2676. }
  2677. // String returns the string representation
  2678. func (s Mitigation) String() string {
  2679. return awsutil.Prettify(s)
  2680. }
  2681. // GoString returns the string representation
  2682. func (s Mitigation) GoString() string {
  2683. return s.String()
  2684. }
  2685. // SetMitigationName sets the MitigationName field's value.
  2686. func (s *Mitigation) SetMitigationName(v string) *Mitigation {
  2687. s.MitigationName = &v
  2688. return s
  2689. }
  2690. // An object that represents a resource that is under DDoS protection.
  2691. type Protection struct {
  2692. _ struct{} `type:"structure"`
  2693. // The unique identifier (ID) of the protection.
  2694. Id *string `min:"1" type:"string"`
  2695. // The friendly name of the protection. For example, My CloudFront distributions.
  2696. Name *string `min:"1" type:"string"`
  2697. // The ARN (Amazon Resource Name) of the AWS resource that is protected.
  2698. ResourceArn *string `min:"1" type:"string"`
  2699. }
  2700. // String returns the string representation
  2701. func (s Protection) String() string {
  2702. return awsutil.Prettify(s)
  2703. }
  2704. // GoString returns the string representation
  2705. func (s Protection) GoString() string {
  2706. return s.String()
  2707. }
  2708. // SetId sets the Id field's value.
  2709. func (s *Protection) SetId(v string) *Protection {
  2710. s.Id = &v
  2711. return s
  2712. }
  2713. // SetName sets the Name field's value.
  2714. func (s *Protection) SetName(v string) *Protection {
  2715. s.Name = &v
  2716. return s
  2717. }
  2718. // SetResourceArn sets the ResourceArn field's value.
  2719. func (s *Protection) SetResourceArn(v string) *Protection {
  2720. s.ResourceArn = &v
  2721. return s
  2722. }
  2723. // The attack information for the specified SubResource.
  2724. type SubResourceSummary struct {
  2725. _ struct{} `type:"structure"`
  2726. // The list of attack types and associated counters.
  2727. AttackVectors []*SummarizedAttackVector `type:"list"`
  2728. // The counters that describe the details of the attack.
  2729. Counters []*SummarizedCounter `type:"list"`
  2730. // The unique identifier (ID) of the SubResource.
  2731. Id *string `type:"string"`
  2732. // The SubResource type.
  2733. Type *string `type:"string" enum:"SubResourceType"`
  2734. }
  2735. // String returns the string representation
  2736. func (s SubResourceSummary) String() string {
  2737. return awsutil.Prettify(s)
  2738. }
  2739. // GoString returns the string representation
  2740. func (s SubResourceSummary) GoString() string {
  2741. return s.String()
  2742. }
  2743. // SetAttackVectors sets the AttackVectors field's value.
  2744. func (s *SubResourceSummary) SetAttackVectors(v []*SummarizedAttackVector) *SubResourceSummary {
  2745. s.AttackVectors = v
  2746. return s
  2747. }
  2748. // SetCounters sets the Counters field's value.
  2749. func (s *SubResourceSummary) SetCounters(v []*SummarizedCounter) *SubResourceSummary {
  2750. s.Counters = v
  2751. return s
  2752. }
  2753. // SetId sets the Id field's value.
  2754. func (s *SubResourceSummary) SetId(v string) *SubResourceSummary {
  2755. s.Id = &v
  2756. return s
  2757. }
  2758. // SetType sets the Type field's value.
  2759. func (s *SubResourceSummary) SetType(v string) *SubResourceSummary {
  2760. s.Type = &v
  2761. return s
  2762. }
  2763. // Information about the AWS Shield Advanced subscription for an account.
  2764. type Subscription struct {
  2765. _ struct{} `type:"structure"`
  2766. // If ENABLED, the subscription will be automatically renewed at the end of
  2767. // the existing subscription period.
  2768. //
  2769. // When you initally create a subscription, AutoRenew is set to ENABLED. You
  2770. // can change this by submitting an UpdateSubscription request. If the UpdateSubscription
  2771. // request does not included a value for AutoRenew, the existing value for AutoRenew
  2772. // remains unchanged.
  2773. AutoRenew *string `type:"string" enum:"AutoRenew"`
  2774. // The date and time your subscription will end.
  2775. EndTime *time.Time `type:"timestamp"`
  2776. // Specifies how many protections of a given type you can create.
  2777. Limits []*Limit `type:"list"`
  2778. // The start time of the subscription, in Unix time in seconds. For more information
  2779. // see timestamp (http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#parameter-types).
  2780. StartTime *time.Time `type:"timestamp"`
  2781. // The length, in seconds, of the AWS Shield Advanced subscription for the account.
  2782. TimeCommitmentInSeconds *int64 `type:"long"`
  2783. }
  2784. // String returns the string representation
  2785. func (s Subscription) String() string {
  2786. return awsutil.Prettify(s)
  2787. }
  2788. // GoString returns the string representation
  2789. func (s Subscription) GoString() string {
  2790. return s.String()
  2791. }
  2792. // SetAutoRenew sets the AutoRenew field's value.
  2793. func (s *Subscription) SetAutoRenew(v string) *Subscription {
  2794. s.AutoRenew = &v
  2795. return s
  2796. }
  2797. // SetEndTime sets the EndTime field's value.
  2798. func (s *Subscription) SetEndTime(v time.Time) *Subscription {
  2799. s.EndTime = &v
  2800. return s
  2801. }
  2802. // SetLimits sets the Limits field's value.
  2803. func (s *Subscription) SetLimits(v []*Limit) *Subscription {
  2804. s.Limits = v
  2805. return s
  2806. }
  2807. // SetStartTime sets the StartTime field's value.
  2808. func (s *Subscription) SetStartTime(v time.Time) *Subscription {
  2809. s.StartTime = &v
  2810. return s
  2811. }
  2812. // SetTimeCommitmentInSeconds sets the TimeCommitmentInSeconds field's value.
  2813. func (s *Subscription) SetTimeCommitmentInSeconds(v int64) *Subscription {
  2814. s.TimeCommitmentInSeconds = &v
  2815. return s
  2816. }
  2817. // A summary of information about the attack.
  2818. type SummarizedAttackVector struct {
  2819. _ struct{} `type:"structure"`
  2820. // The list of counters that describe the details of the attack.
  2821. VectorCounters []*SummarizedCounter `type:"list"`
  2822. // The attack type, for example, SNMP reflection or SYN flood.
  2823. //
  2824. // VectorType is a required field
  2825. VectorType *string `type:"string" required:"true"`
  2826. }
  2827. // String returns the string representation
  2828. func (s SummarizedAttackVector) String() string {
  2829. return awsutil.Prettify(s)
  2830. }
  2831. // GoString returns the string representation
  2832. func (s SummarizedAttackVector) GoString() string {
  2833. return s.String()
  2834. }
  2835. // SetVectorCounters sets the VectorCounters field's value.
  2836. func (s *SummarizedAttackVector) SetVectorCounters(v []*SummarizedCounter) *SummarizedAttackVector {
  2837. s.VectorCounters = v
  2838. return s
  2839. }
  2840. // SetVectorType sets the VectorType field's value.
  2841. func (s *SummarizedAttackVector) SetVectorType(v string) *SummarizedAttackVector {
  2842. s.VectorType = &v
  2843. return s
  2844. }
  2845. // The counter that describes a DDoS attack.
  2846. type SummarizedCounter struct {
  2847. _ struct{} `type:"structure"`
  2848. // The average value of the counter for a specified time period.
  2849. Average *float64 `type:"double"`
  2850. // The maximum value of the counter for a specified time period.
  2851. Max *float64 `type:"double"`
  2852. // The number of counters for a specified time period.
  2853. N *int64 `type:"integer"`
  2854. // The counter name.
  2855. Name *string `type:"string"`
  2856. // The total of counter values for a specified time period.
  2857. Sum *float64 `type:"double"`
  2858. // The unit of the counters.
  2859. Unit *string `type:"string"`
  2860. }
  2861. // String returns the string representation
  2862. func (s SummarizedCounter) String() string {
  2863. return awsutil.Prettify(s)
  2864. }
  2865. // GoString returns the string representation
  2866. func (s SummarizedCounter) GoString() string {
  2867. return s.String()
  2868. }
  2869. // SetAverage sets the Average field's value.
  2870. func (s *SummarizedCounter) SetAverage(v float64) *SummarizedCounter {
  2871. s.Average = &v
  2872. return s
  2873. }
  2874. // SetMax sets the Max field's value.
  2875. func (s *SummarizedCounter) SetMax(v float64) *SummarizedCounter {
  2876. s.Max = &v
  2877. return s
  2878. }
  2879. // SetN sets the N field's value.
  2880. func (s *SummarizedCounter) SetN(v int64) *SummarizedCounter {
  2881. s.N = &v
  2882. return s
  2883. }
  2884. // SetName sets the Name field's value.
  2885. func (s *SummarizedCounter) SetName(v string) *SummarizedCounter {
  2886. s.Name = &v
  2887. return s
  2888. }
  2889. // SetSum sets the Sum field's value.
  2890. func (s *SummarizedCounter) SetSum(v float64) *SummarizedCounter {
  2891. s.Sum = &v
  2892. return s
  2893. }
  2894. // SetUnit sets the Unit field's value.
  2895. func (s *SummarizedCounter) SetUnit(v string) *SummarizedCounter {
  2896. s.Unit = &v
  2897. return s
  2898. }
  2899. // The time range.
  2900. type TimeRange struct {
  2901. _ struct{} `type:"structure"`
  2902. // The start time, in Unix time in seconds. For more information see timestamp
  2903. // (http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#parameter-types).
  2904. FromInclusive *time.Time `type:"timestamp"`
  2905. // The end time, in Unix time in seconds. For more information see timestamp
  2906. // (http://docs.aws.amazon.com/cli/latest/userguide/cli-using-param.html#parameter-types).
  2907. ToExclusive *time.Time `type:"timestamp"`
  2908. }
  2909. // String returns the string representation
  2910. func (s TimeRange) String() string {
  2911. return awsutil.Prettify(s)
  2912. }
  2913. // GoString returns the string representation
  2914. func (s TimeRange) GoString() string {
  2915. return s.String()
  2916. }
  2917. // SetFromInclusive sets the FromInclusive field's value.
  2918. func (s *TimeRange) SetFromInclusive(v time.Time) *TimeRange {
  2919. s.FromInclusive = &v
  2920. return s
  2921. }
  2922. // SetToExclusive sets the ToExclusive field's value.
  2923. func (s *TimeRange) SetToExclusive(v time.Time) *TimeRange {
  2924. s.ToExclusive = &v
  2925. return s
  2926. }
  2927. type UpdateEmergencyContactSettingsInput struct {
  2928. _ struct{} `type:"structure"`
  2929. // A list of email addresses that the DRT can use to contact you during a suspected
  2930. // attack.
  2931. EmergencyContactList []*EmergencyContact `type:"list"`
  2932. }
  2933. // String returns the string representation
  2934. func (s UpdateEmergencyContactSettingsInput) String() string {
  2935. return awsutil.Prettify(s)
  2936. }
  2937. // GoString returns the string representation
  2938. func (s UpdateEmergencyContactSettingsInput) GoString() string {
  2939. return s.String()
  2940. }
  2941. // Validate inspects the fields of the type to determine if they are valid.
  2942. func (s *UpdateEmergencyContactSettingsInput) Validate() error {
  2943. invalidParams := request.ErrInvalidParams{Context: "UpdateEmergencyContactSettingsInput"}
  2944. if s.EmergencyContactList != nil {
  2945. for i, v := range s.EmergencyContactList {
  2946. if v == nil {
  2947. continue
  2948. }
  2949. if err := v.Validate(); err != nil {
  2950. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "EmergencyContactList", i), err.(request.ErrInvalidParams))
  2951. }
  2952. }
  2953. }
  2954. if invalidParams.Len() > 0 {
  2955. return invalidParams
  2956. }
  2957. return nil
  2958. }
  2959. // SetEmergencyContactList sets the EmergencyContactList field's value.
  2960. func (s *UpdateEmergencyContactSettingsInput) SetEmergencyContactList(v []*EmergencyContact) *UpdateEmergencyContactSettingsInput {
  2961. s.EmergencyContactList = v
  2962. return s
  2963. }
  2964. type UpdateEmergencyContactSettingsOutput struct {
  2965. _ struct{} `type:"structure"`
  2966. }
  2967. // String returns the string representation
  2968. func (s UpdateEmergencyContactSettingsOutput) String() string {
  2969. return awsutil.Prettify(s)
  2970. }
  2971. // GoString returns the string representation
  2972. func (s UpdateEmergencyContactSettingsOutput) GoString() string {
  2973. return s.String()
  2974. }
  2975. type UpdateSubscriptionInput struct {
  2976. _ struct{} `type:"structure"`
  2977. // When you initally create a subscription, AutoRenew is set to ENABLED. If
  2978. // ENABLED, the subscription will be automatically renewed at the end of the
  2979. // existing subscription period. You can change this by submitting an UpdateSubscription
  2980. // request. If the UpdateSubscription request does not included a value for
  2981. // AutoRenew, the existing value for AutoRenew remains unchanged.
  2982. AutoRenew *string `type:"string" enum:"AutoRenew"`
  2983. }
  2984. // String returns the string representation
  2985. func (s UpdateSubscriptionInput) String() string {
  2986. return awsutil.Prettify(s)
  2987. }
  2988. // GoString returns the string representation
  2989. func (s UpdateSubscriptionInput) GoString() string {
  2990. return s.String()
  2991. }
  2992. // SetAutoRenew sets the AutoRenew field's value.
  2993. func (s *UpdateSubscriptionInput) SetAutoRenew(v string) *UpdateSubscriptionInput {
  2994. s.AutoRenew = &v
  2995. return s
  2996. }
  2997. type UpdateSubscriptionOutput struct {
  2998. _ struct{} `type:"structure"`
  2999. }
  3000. // String returns the string representation
  3001. func (s UpdateSubscriptionOutput) String() string {
  3002. return awsutil.Prettify(s)
  3003. }
  3004. // GoString returns the string representation
  3005. func (s UpdateSubscriptionOutput) GoString() string {
  3006. return s.String()
  3007. }
  3008. const (
  3009. // AttackLayerNetwork is a AttackLayer enum value
  3010. AttackLayerNetwork = "NETWORK"
  3011. // AttackLayerApplication is a AttackLayer enum value
  3012. AttackLayerApplication = "APPLICATION"
  3013. )
  3014. const (
  3015. // AttackPropertyIdentifierDestinationUrl is a AttackPropertyIdentifier enum value
  3016. AttackPropertyIdentifierDestinationUrl = "DESTINATION_URL"
  3017. // AttackPropertyIdentifierReferrer is a AttackPropertyIdentifier enum value
  3018. AttackPropertyIdentifierReferrer = "REFERRER"
  3019. // AttackPropertyIdentifierSourceAsn is a AttackPropertyIdentifier enum value
  3020. AttackPropertyIdentifierSourceAsn = "SOURCE_ASN"
  3021. // AttackPropertyIdentifierSourceCountry is a AttackPropertyIdentifier enum value
  3022. AttackPropertyIdentifierSourceCountry = "SOURCE_COUNTRY"
  3023. // AttackPropertyIdentifierSourceIpAddress is a AttackPropertyIdentifier enum value
  3024. AttackPropertyIdentifierSourceIpAddress = "SOURCE_IP_ADDRESS"
  3025. // AttackPropertyIdentifierSourceUserAgent is a AttackPropertyIdentifier enum value
  3026. AttackPropertyIdentifierSourceUserAgent = "SOURCE_USER_AGENT"
  3027. )
  3028. const (
  3029. // AutoRenewEnabled is a AutoRenew enum value
  3030. AutoRenewEnabled = "ENABLED"
  3031. // AutoRenewDisabled is a AutoRenew enum value
  3032. AutoRenewDisabled = "DISABLED"
  3033. )
  3034. const (
  3035. // SubResourceTypeIp is a SubResourceType enum value
  3036. SubResourceTypeIp = "IP"
  3037. // SubResourceTypeUrl is a SubResourceType enum value
  3038. SubResourceTypeUrl = "URL"
  3039. )
  3040. const (
  3041. // SubscriptionStateActive is a SubscriptionState enum value
  3042. SubscriptionStateActive = "ACTIVE"
  3043. // SubscriptionStateInactive is a SubscriptionState enum value
  3044. SubscriptionStateInactive = "INACTIVE"
  3045. )
  3046. const (
  3047. // UnitBits is a Unit enum value
  3048. UnitBits = "BITS"
  3049. // UnitBytes is a Unit enum value
  3050. UnitBytes = "BYTES"
  3051. // UnitPackets is a Unit enum value
  3052. UnitPackets = "PACKETS"
  3053. // UnitRequests is a Unit enum value
  3054. UnitRequests = "REQUESTS"
  3055. )