api.go 95 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754
  1. // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
  2. package fms
  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 opAssociateAdminAccount = "AssociateAdminAccount"
  13. // AssociateAdminAccountRequest generates a "aws/request.Request" representing the
  14. // client's request for the AssociateAdminAccount 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 AssociateAdminAccount for more information on using the AssociateAdminAccount
  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 AssociateAdminAccountRequest method.
  29. // req, resp := client.AssociateAdminAccountRequest(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/fms-2018-01-01/AssociateAdminAccount
  37. func (c *FMS) AssociateAdminAccountRequest(input *AssociateAdminAccountInput) (req *request.Request, output *AssociateAdminAccountOutput) {
  38. op := &request.Operation{
  39. Name: opAssociateAdminAccount,
  40. HTTPMethod: "POST",
  41. HTTPPath: "/",
  42. }
  43. if input == nil {
  44. input = &AssociateAdminAccountInput{}
  45. }
  46. output = &AssociateAdminAccountOutput{}
  47. req = c.newRequest(op, input, output)
  48. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  49. return
  50. }
  51. // AssociateAdminAccount API operation for Firewall Management Service.
  52. //
  53. // Sets the AWS Firewall Manager administrator account. AWS Firewall Manager
  54. // must be associated with the master account your AWS organization or associated
  55. // with a member account that has the appropriate permissions. If the account
  56. // ID that you submit is not an AWS Organizations master account, AWS Firewall
  57. // Manager will set the appropriate permissions for the given member account.
  58. //
  59. // The account that you associate with AWS Firewall Manager is called the AWS
  60. // Firewall Manager administrator account.
  61. //
  62. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  63. // with awserr.Error's Code and Message methods to get detailed information about
  64. // the error.
  65. //
  66. // See the AWS API reference guide for Firewall Management Service's
  67. // API operation AssociateAdminAccount for usage and error information.
  68. //
  69. // Returned Error Codes:
  70. // * ErrCodeInvalidOperationException "InvalidOperationException"
  71. // The operation failed because there was nothing to do. For example, you might
  72. // have submitted an AssociateAdminAccount request, but the account ID that
  73. // you submitted was already set as the AWS Firewall Manager administrator.
  74. //
  75. // * ErrCodeInvalidInputException "InvalidInputException"
  76. // The parameters of the request were invalid.
  77. //
  78. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  79. // The specified resource was not found.
  80. //
  81. // * ErrCodeInternalErrorException "InternalErrorException"
  82. // The operation failed because of a system problem, even though the request
  83. // was valid. Retry your request.
  84. //
  85. // See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/AssociateAdminAccount
  86. func (c *FMS) AssociateAdminAccount(input *AssociateAdminAccountInput) (*AssociateAdminAccountOutput, error) {
  87. req, out := c.AssociateAdminAccountRequest(input)
  88. return out, req.Send()
  89. }
  90. // AssociateAdminAccountWithContext is the same as AssociateAdminAccount with the addition of
  91. // the ability to pass a context and additional request options.
  92. //
  93. // See AssociateAdminAccount for details on how to use this API operation.
  94. //
  95. // The context must be non-nil and will be used for request cancellation. If
  96. // the context is nil a panic will occur. In the future the SDK may create
  97. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  98. // for more information on using Contexts.
  99. func (c *FMS) AssociateAdminAccountWithContext(ctx aws.Context, input *AssociateAdminAccountInput, opts ...request.Option) (*AssociateAdminAccountOutput, error) {
  100. req, out := c.AssociateAdminAccountRequest(input)
  101. req.SetContext(ctx)
  102. req.ApplyOptions(opts...)
  103. return out, req.Send()
  104. }
  105. const opDeleteNotificationChannel = "DeleteNotificationChannel"
  106. // DeleteNotificationChannelRequest generates a "aws/request.Request" representing the
  107. // client's request for the DeleteNotificationChannel operation. The "output" return
  108. // value will be populated with the request's response once the request completes
  109. // successfully.
  110. //
  111. // Use "Send" method on the returned Request to send the API call to the service.
  112. // the "output" return value is not valid until after Send returns without error.
  113. //
  114. // See DeleteNotificationChannel for more information on using the DeleteNotificationChannel
  115. // API call, and error handling.
  116. //
  117. // This method is useful when you want to inject custom logic or configuration
  118. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  119. //
  120. //
  121. // // Example sending a request using the DeleteNotificationChannelRequest method.
  122. // req, resp := client.DeleteNotificationChannelRequest(params)
  123. //
  124. // err := req.Send()
  125. // if err == nil { // resp is now filled
  126. // fmt.Println(resp)
  127. // }
  128. //
  129. // See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/DeleteNotificationChannel
  130. func (c *FMS) DeleteNotificationChannelRequest(input *DeleteNotificationChannelInput) (req *request.Request, output *DeleteNotificationChannelOutput) {
  131. op := &request.Operation{
  132. Name: opDeleteNotificationChannel,
  133. HTTPMethod: "POST",
  134. HTTPPath: "/",
  135. }
  136. if input == nil {
  137. input = &DeleteNotificationChannelInput{}
  138. }
  139. output = &DeleteNotificationChannelOutput{}
  140. req = c.newRequest(op, input, output)
  141. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  142. return
  143. }
  144. // DeleteNotificationChannel API operation for Firewall Management Service.
  145. //
  146. // Deletes an AWS Firewall Manager association with the IAM role and the Amazon
  147. // Simple Notification Service (SNS) topic that is used to record AWS Firewall
  148. // Manager SNS logs.
  149. //
  150. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  151. // with awserr.Error's Code and Message methods to get detailed information about
  152. // the error.
  153. //
  154. // See the AWS API reference guide for Firewall Management Service's
  155. // API operation DeleteNotificationChannel for usage and error information.
  156. //
  157. // Returned Error Codes:
  158. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  159. // The specified resource was not found.
  160. //
  161. // * ErrCodeInvalidOperationException "InvalidOperationException"
  162. // The operation failed because there was nothing to do. For example, you might
  163. // have submitted an AssociateAdminAccount request, but the account ID that
  164. // you submitted was already set as the AWS Firewall Manager administrator.
  165. //
  166. // * ErrCodeInternalErrorException "InternalErrorException"
  167. // The operation failed because of a system problem, even though the request
  168. // was valid. Retry your request.
  169. //
  170. // See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/DeleteNotificationChannel
  171. func (c *FMS) DeleteNotificationChannel(input *DeleteNotificationChannelInput) (*DeleteNotificationChannelOutput, error) {
  172. req, out := c.DeleteNotificationChannelRequest(input)
  173. return out, req.Send()
  174. }
  175. // DeleteNotificationChannelWithContext is the same as DeleteNotificationChannel with the addition of
  176. // the ability to pass a context and additional request options.
  177. //
  178. // See DeleteNotificationChannel for details on how to use this API operation.
  179. //
  180. // The context must be non-nil and will be used for request cancellation. If
  181. // the context is nil a panic will occur. In the future the SDK may create
  182. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  183. // for more information on using Contexts.
  184. func (c *FMS) DeleteNotificationChannelWithContext(ctx aws.Context, input *DeleteNotificationChannelInput, opts ...request.Option) (*DeleteNotificationChannelOutput, error) {
  185. req, out := c.DeleteNotificationChannelRequest(input)
  186. req.SetContext(ctx)
  187. req.ApplyOptions(opts...)
  188. return out, req.Send()
  189. }
  190. const opDeletePolicy = "DeletePolicy"
  191. // DeletePolicyRequest generates a "aws/request.Request" representing the
  192. // client's request for the DeletePolicy operation. The "output" return
  193. // value will be populated with the request's response once the request completes
  194. // successfully.
  195. //
  196. // Use "Send" method on the returned Request to send the API call to the service.
  197. // the "output" return value is not valid until after Send returns without error.
  198. //
  199. // See DeletePolicy for more information on using the DeletePolicy
  200. // API call, and error handling.
  201. //
  202. // This method is useful when you want to inject custom logic or configuration
  203. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  204. //
  205. //
  206. // // Example sending a request using the DeletePolicyRequest method.
  207. // req, resp := client.DeletePolicyRequest(params)
  208. //
  209. // err := req.Send()
  210. // if err == nil { // resp is now filled
  211. // fmt.Println(resp)
  212. // }
  213. //
  214. // See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/DeletePolicy
  215. func (c *FMS) DeletePolicyRequest(input *DeletePolicyInput) (req *request.Request, output *DeletePolicyOutput) {
  216. op := &request.Operation{
  217. Name: opDeletePolicy,
  218. HTTPMethod: "POST",
  219. HTTPPath: "/",
  220. }
  221. if input == nil {
  222. input = &DeletePolicyInput{}
  223. }
  224. output = &DeletePolicyOutput{}
  225. req = c.newRequest(op, input, output)
  226. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  227. return
  228. }
  229. // DeletePolicy API operation for Firewall Management Service.
  230. //
  231. // Permanently deletes an AWS Firewall Manager policy.
  232. //
  233. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  234. // with awserr.Error's Code and Message methods to get detailed information about
  235. // the error.
  236. //
  237. // See the AWS API reference guide for Firewall Management Service's
  238. // API operation DeletePolicy for usage and error information.
  239. //
  240. // Returned Error Codes:
  241. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  242. // The specified resource was not found.
  243. //
  244. // * ErrCodeInvalidOperationException "InvalidOperationException"
  245. // The operation failed because there was nothing to do. For example, you might
  246. // have submitted an AssociateAdminAccount request, but the account ID that
  247. // you submitted was already set as the AWS Firewall Manager administrator.
  248. //
  249. // * ErrCodeInternalErrorException "InternalErrorException"
  250. // The operation failed because of a system problem, even though the request
  251. // was valid. Retry your request.
  252. //
  253. // See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/DeletePolicy
  254. func (c *FMS) DeletePolicy(input *DeletePolicyInput) (*DeletePolicyOutput, error) {
  255. req, out := c.DeletePolicyRequest(input)
  256. return out, req.Send()
  257. }
  258. // DeletePolicyWithContext is the same as DeletePolicy with the addition of
  259. // the ability to pass a context and additional request options.
  260. //
  261. // See DeletePolicy for details on how to use this API operation.
  262. //
  263. // The context must be non-nil and will be used for request cancellation. If
  264. // the context is nil a panic will occur. In the future the SDK may create
  265. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  266. // for more information on using Contexts.
  267. func (c *FMS) DeletePolicyWithContext(ctx aws.Context, input *DeletePolicyInput, opts ...request.Option) (*DeletePolicyOutput, error) {
  268. req, out := c.DeletePolicyRequest(input)
  269. req.SetContext(ctx)
  270. req.ApplyOptions(opts...)
  271. return out, req.Send()
  272. }
  273. const opDisassociateAdminAccount = "DisassociateAdminAccount"
  274. // DisassociateAdminAccountRequest generates a "aws/request.Request" representing the
  275. // client's request for the DisassociateAdminAccount operation. The "output" return
  276. // value will be populated with the request's response once the request completes
  277. // successfully.
  278. //
  279. // Use "Send" method on the returned Request to send the API call to the service.
  280. // the "output" return value is not valid until after Send returns without error.
  281. //
  282. // See DisassociateAdminAccount for more information on using the DisassociateAdminAccount
  283. // API call, and error handling.
  284. //
  285. // This method is useful when you want to inject custom logic or configuration
  286. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  287. //
  288. //
  289. // // Example sending a request using the DisassociateAdminAccountRequest method.
  290. // req, resp := client.DisassociateAdminAccountRequest(params)
  291. //
  292. // err := req.Send()
  293. // if err == nil { // resp is now filled
  294. // fmt.Println(resp)
  295. // }
  296. //
  297. // See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/DisassociateAdminAccount
  298. func (c *FMS) DisassociateAdminAccountRequest(input *DisassociateAdminAccountInput) (req *request.Request, output *DisassociateAdminAccountOutput) {
  299. op := &request.Operation{
  300. Name: opDisassociateAdminAccount,
  301. HTTPMethod: "POST",
  302. HTTPPath: "/",
  303. }
  304. if input == nil {
  305. input = &DisassociateAdminAccountInput{}
  306. }
  307. output = &DisassociateAdminAccountOutput{}
  308. req = c.newRequest(op, input, output)
  309. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  310. return
  311. }
  312. // DisassociateAdminAccount API operation for Firewall Management Service.
  313. //
  314. // Disassociates the account that has been set as the AWS Firewall Manager administrator
  315. // account. To set a different account as the administrator account, you must
  316. // submit an AssociateAdminAccount request .
  317. //
  318. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  319. // with awserr.Error's Code and Message methods to get detailed information about
  320. // the error.
  321. //
  322. // See the AWS API reference guide for Firewall Management Service's
  323. // API operation DisassociateAdminAccount for usage and error information.
  324. //
  325. // Returned Error Codes:
  326. // * ErrCodeInvalidOperationException "InvalidOperationException"
  327. // The operation failed because there was nothing to do. For example, you might
  328. // have submitted an AssociateAdminAccount request, but the account ID that
  329. // you submitted was already set as the AWS Firewall Manager administrator.
  330. //
  331. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  332. // The specified resource was not found.
  333. //
  334. // * ErrCodeInternalErrorException "InternalErrorException"
  335. // The operation failed because of a system problem, even though the request
  336. // was valid. Retry your request.
  337. //
  338. // See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/DisassociateAdminAccount
  339. func (c *FMS) DisassociateAdminAccount(input *DisassociateAdminAccountInput) (*DisassociateAdminAccountOutput, error) {
  340. req, out := c.DisassociateAdminAccountRequest(input)
  341. return out, req.Send()
  342. }
  343. // DisassociateAdminAccountWithContext is the same as DisassociateAdminAccount with the addition of
  344. // the ability to pass a context and additional request options.
  345. //
  346. // See DisassociateAdminAccount for details on how to use this API operation.
  347. //
  348. // The context must be non-nil and will be used for request cancellation. If
  349. // the context is nil a panic will occur. In the future the SDK may create
  350. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  351. // for more information on using Contexts.
  352. func (c *FMS) DisassociateAdminAccountWithContext(ctx aws.Context, input *DisassociateAdminAccountInput, opts ...request.Option) (*DisassociateAdminAccountOutput, error) {
  353. req, out := c.DisassociateAdminAccountRequest(input)
  354. req.SetContext(ctx)
  355. req.ApplyOptions(opts...)
  356. return out, req.Send()
  357. }
  358. const opGetAdminAccount = "GetAdminAccount"
  359. // GetAdminAccountRequest generates a "aws/request.Request" representing the
  360. // client's request for the GetAdminAccount operation. The "output" return
  361. // value will be populated with the request's response once the request completes
  362. // successfully.
  363. //
  364. // Use "Send" method on the returned Request to send the API call to the service.
  365. // the "output" return value is not valid until after Send returns without error.
  366. //
  367. // See GetAdminAccount for more information on using the GetAdminAccount
  368. // API call, and error handling.
  369. //
  370. // This method is useful when you want to inject custom logic or configuration
  371. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  372. //
  373. //
  374. // // Example sending a request using the GetAdminAccountRequest method.
  375. // req, resp := client.GetAdminAccountRequest(params)
  376. //
  377. // err := req.Send()
  378. // if err == nil { // resp is now filled
  379. // fmt.Println(resp)
  380. // }
  381. //
  382. // See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/GetAdminAccount
  383. func (c *FMS) GetAdminAccountRequest(input *GetAdminAccountInput) (req *request.Request, output *GetAdminAccountOutput) {
  384. op := &request.Operation{
  385. Name: opGetAdminAccount,
  386. HTTPMethod: "POST",
  387. HTTPPath: "/",
  388. }
  389. if input == nil {
  390. input = &GetAdminAccountInput{}
  391. }
  392. output = &GetAdminAccountOutput{}
  393. req = c.newRequest(op, input, output)
  394. return
  395. }
  396. // GetAdminAccount API operation for Firewall Management Service.
  397. //
  398. // Returns the AWS Organizations master account that is associated with AWS
  399. // Firewall Manager as the AWS Firewall Manager administrator.
  400. //
  401. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  402. // with awserr.Error's Code and Message methods to get detailed information about
  403. // the error.
  404. //
  405. // See the AWS API reference guide for Firewall Management Service's
  406. // API operation GetAdminAccount for usage and error information.
  407. //
  408. // Returned Error Codes:
  409. // * ErrCodeInvalidOperationException "InvalidOperationException"
  410. // The operation failed because there was nothing to do. For example, you might
  411. // have submitted an AssociateAdminAccount request, but the account ID that
  412. // you submitted was already set as the AWS Firewall Manager administrator.
  413. //
  414. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  415. // The specified resource was not found.
  416. //
  417. // * ErrCodeInternalErrorException "InternalErrorException"
  418. // The operation failed because of a system problem, even though the request
  419. // was valid. Retry your request.
  420. //
  421. // See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/GetAdminAccount
  422. func (c *FMS) GetAdminAccount(input *GetAdminAccountInput) (*GetAdminAccountOutput, error) {
  423. req, out := c.GetAdminAccountRequest(input)
  424. return out, req.Send()
  425. }
  426. // GetAdminAccountWithContext is the same as GetAdminAccount with the addition of
  427. // the ability to pass a context and additional request options.
  428. //
  429. // See GetAdminAccount for details on how to use this API operation.
  430. //
  431. // The context must be non-nil and will be used for request cancellation. If
  432. // the context is nil a panic will occur. In the future the SDK may create
  433. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  434. // for more information on using Contexts.
  435. func (c *FMS) GetAdminAccountWithContext(ctx aws.Context, input *GetAdminAccountInput, opts ...request.Option) (*GetAdminAccountOutput, error) {
  436. req, out := c.GetAdminAccountRequest(input)
  437. req.SetContext(ctx)
  438. req.ApplyOptions(opts...)
  439. return out, req.Send()
  440. }
  441. const opGetComplianceDetail = "GetComplianceDetail"
  442. // GetComplianceDetailRequest generates a "aws/request.Request" representing the
  443. // client's request for the GetComplianceDetail operation. The "output" return
  444. // value will be populated with the request's response once the request completes
  445. // successfully.
  446. //
  447. // Use "Send" method on the returned Request to send the API call to the service.
  448. // the "output" return value is not valid until after Send returns without error.
  449. //
  450. // See GetComplianceDetail for more information on using the GetComplianceDetail
  451. // API call, and error handling.
  452. //
  453. // This method is useful when you want to inject custom logic or configuration
  454. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  455. //
  456. //
  457. // // Example sending a request using the GetComplianceDetailRequest method.
  458. // req, resp := client.GetComplianceDetailRequest(params)
  459. //
  460. // err := req.Send()
  461. // if err == nil { // resp is now filled
  462. // fmt.Println(resp)
  463. // }
  464. //
  465. // See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/GetComplianceDetail
  466. func (c *FMS) GetComplianceDetailRequest(input *GetComplianceDetailInput) (req *request.Request, output *GetComplianceDetailOutput) {
  467. op := &request.Operation{
  468. Name: opGetComplianceDetail,
  469. HTTPMethod: "POST",
  470. HTTPPath: "/",
  471. }
  472. if input == nil {
  473. input = &GetComplianceDetailInput{}
  474. }
  475. output = &GetComplianceDetailOutput{}
  476. req = c.newRequest(op, input, output)
  477. return
  478. }
  479. // GetComplianceDetail API operation for Firewall Management Service.
  480. //
  481. // Returns detailed compliance information about the specified member account.
  482. // Details include resources that are in and out of compliance with the specified
  483. // policy. Resources are considered non-compliant if the specified policy has
  484. // not been applied to them.
  485. //
  486. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  487. // with awserr.Error's Code and Message methods to get detailed information about
  488. // the error.
  489. //
  490. // See the AWS API reference guide for Firewall Management Service's
  491. // API operation GetComplianceDetail for usage and error information.
  492. //
  493. // Returned Error Codes:
  494. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  495. // The specified resource was not found.
  496. //
  497. // * ErrCodeInternalErrorException "InternalErrorException"
  498. // The operation failed because of a system problem, even though the request
  499. // was valid. Retry your request.
  500. //
  501. // See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/GetComplianceDetail
  502. func (c *FMS) GetComplianceDetail(input *GetComplianceDetailInput) (*GetComplianceDetailOutput, error) {
  503. req, out := c.GetComplianceDetailRequest(input)
  504. return out, req.Send()
  505. }
  506. // GetComplianceDetailWithContext is the same as GetComplianceDetail with the addition of
  507. // the ability to pass a context and additional request options.
  508. //
  509. // See GetComplianceDetail 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 *FMS) GetComplianceDetailWithContext(ctx aws.Context, input *GetComplianceDetailInput, opts ...request.Option) (*GetComplianceDetailOutput, error) {
  516. req, out := c.GetComplianceDetailRequest(input)
  517. req.SetContext(ctx)
  518. req.ApplyOptions(opts...)
  519. return out, req.Send()
  520. }
  521. const opGetNotificationChannel = "GetNotificationChannel"
  522. // GetNotificationChannelRequest generates a "aws/request.Request" representing the
  523. // client's request for the GetNotificationChannel 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 GetNotificationChannel for more information on using the GetNotificationChannel
  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 GetNotificationChannelRequest method.
  538. // req, resp := client.GetNotificationChannelRequest(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/fms-2018-01-01/GetNotificationChannel
  546. func (c *FMS) GetNotificationChannelRequest(input *GetNotificationChannelInput) (req *request.Request, output *GetNotificationChannelOutput) {
  547. op := &request.Operation{
  548. Name: opGetNotificationChannel,
  549. HTTPMethod: "POST",
  550. HTTPPath: "/",
  551. }
  552. if input == nil {
  553. input = &GetNotificationChannelInput{}
  554. }
  555. output = &GetNotificationChannelOutput{}
  556. req = c.newRequest(op, input, output)
  557. return
  558. }
  559. // GetNotificationChannel API operation for Firewall Management Service.
  560. //
  561. // Returns information about the Amazon Simple Notification Service (SNS) topic
  562. // that is used to record AWS Firewall Manager SNS logs.
  563. //
  564. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  565. // with awserr.Error's Code and Message methods to get detailed information about
  566. // the error.
  567. //
  568. // See the AWS API reference guide for Firewall Management Service's
  569. // API operation GetNotificationChannel for usage and error information.
  570. //
  571. // Returned Error Codes:
  572. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  573. // The specified resource was not found.
  574. //
  575. // * ErrCodeInvalidOperationException "InvalidOperationException"
  576. // The operation failed because there was nothing to do. For example, you might
  577. // have submitted an AssociateAdminAccount request, but the account ID that
  578. // you submitted was already set as the AWS Firewall Manager administrator.
  579. //
  580. // * ErrCodeInternalErrorException "InternalErrorException"
  581. // The operation failed because of a system problem, even though the request
  582. // was valid. Retry your request.
  583. //
  584. // See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/GetNotificationChannel
  585. func (c *FMS) GetNotificationChannel(input *GetNotificationChannelInput) (*GetNotificationChannelOutput, error) {
  586. req, out := c.GetNotificationChannelRequest(input)
  587. return out, req.Send()
  588. }
  589. // GetNotificationChannelWithContext is the same as GetNotificationChannel with the addition of
  590. // the ability to pass a context and additional request options.
  591. //
  592. // See GetNotificationChannel for details on how to use this API operation.
  593. //
  594. // The context must be non-nil and will be used for request cancellation. If
  595. // the context is nil a panic will occur. In the future the SDK may create
  596. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  597. // for more information on using Contexts.
  598. func (c *FMS) GetNotificationChannelWithContext(ctx aws.Context, input *GetNotificationChannelInput, opts ...request.Option) (*GetNotificationChannelOutput, error) {
  599. req, out := c.GetNotificationChannelRequest(input)
  600. req.SetContext(ctx)
  601. req.ApplyOptions(opts...)
  602. return out, req.Send()
  603. }
  604. const opGetPolicy = "GetPolicy"
  605. // GetPolicyRequest generates a "aws/request.Request" representing the
  606. // client's request for the GetPolicy operation. The "output" return
  607. // value will be populated with the request's response once the request completes
  608. // successfully.
  609. //
  610. // Use "Send" method on the returned Request to send the API call to the service.
  611. // the "output" return value is not valid until after Send returns without error.
  612. //
  613. // See GetPolicy for more information on using the GetPolicy
  614. // API call, and error handling.
  615. //
  616. // This method is useful when you want to inject custom logic or configuration
  617. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  618. //
  619. //
  620. // // Example sending a request using the GetPolicyRequest method.
  621. // req, resp := client.GetPolicyRequest(params)
  622. //
  623. // err := req.Send()
  624. // if err == nil { // resp is now filled
  625. // fmt.Println(resp)
  626. // }
  627. //
  628. // See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/GetPolicy
  629. func (c *FMS) GetPolicyRequest(input *GetPolicyInput) (req *request.Request, output *GetPolicyOutput) {
  630. op := &request.Operation{
  631. Name: opGetPolicy,
  632. HTTPMethod: "POST",
  633. HTTPPath: "/",
  634. }
  635. if input == nil {
  636. input = &GetPolicyInput{}
  637. }
  638. output = &GetPolicyOutput{}
  639. req = c.newRequest(op, input, output)
  640. return
  641. }
  642. // GetPolicy API operation for Firewall Management Service.
  643. //
  644. // Returns information about the specified AWS Firewall Manager policy.
  645. //
  646. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  647. // with awserr.Error's Code and Message methods to get detailed information about
  648. // the error.
  649. //
  650. // See the AWS API reference guide for Firewall Management Service's
  651. // API operation GetPolicy for usage and error information.
  652. //
  653. // Returned Error Codes:
  654. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  655. // The specified resource was not found.
  656. //
  657. // * ErrCodeInvalidOperationException "InvalidOperationException"
  658. // The operation failed because there was nothing to do. For example, you might
  659. // have submitted an AssociateAdminAccount request, but the account ID that
  660. // you submitted was already set as the AWS Firewall Manager administrator.
  661. //
  662. // * ErrCodeInternalErrorException "InternalErrorException"
  663. // The operation failed because of a system problem, even though the request
  664. // was valid. Retry your request.
  665. //
  666. // * ErrCodeInvalidTypeException "InvalidTypeException"
  667. // The value of the Type parameter is invalid.
  668. //
  669. // See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/GetPolicy
  670. func (c *FMS) GetPolicy(input *GetPolicyInput) (*GetPolicyOutput, error) {
  671. req, out := c.GetPolicyRequest(input)
  672. return out, req.Send()
  673. }
  674. // GetPolicyWithContext is the same as GetPolicy with the addition of
  675. // the ability to pass a context and additional request options.
  676. //
  677. // See GetPolicy for details on how to use this API operation.
  678. //
  679. // The context must be non-nil and will be used for request cancellation. If
  680. // the context is nil a panic will occur. In the future the SDK may create
  681. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  682. // for more information on using Contexts.
  683. func (c *FMS) GetPolicyWithContext(ctx aws.Context, input *GetPolicyInput, opts ...request.Option) (*GetPolicyOutput, error) {
  684. req, out := c.GetPolicyRequest(input)
  685. req.SetContext(ctx)
  686. req.ApplyOptions(opts...)
  687. return out, req.Send()
  688. }
  689. const opListComplianceStatus = "ListComplianceStatus"
  690. // ListComplianceStatusRequest generates a "aws/request.Request" representing the
  691. // client's request for the ListComplianceStatus operation. The "output" return
  692. // value will be populated with the request's response once the request completes
  693. // successfully.
  694. //
  695. // Use "Send" method on the returned Request to send the API call to the service.
  696. // the "output" return value is not valid until after Send returns without error.
  697. //
  698. // See ListComplianceStatus for more information on using the ListComplianceStatus
  699. // API call, and error handling.
  700. //
  701. // This method is useful when you want to inject custom logic or configuration
  702. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  703. //
  704. //
  705. // // Example sending a request using the ListComplianceStatusRequest method.
  706. // req, resp := client.ListComplianceStatusRequest(params)
  707. //
  708. // err := req.Send()
  709. // if err == nil { // resp is now filled
  710. // fmt.Println(resp)
  711. // }
  712. //
  713. // See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/ListComplianceStatus
  714. func (c *FMS) ListComplianceStatusRequest(input *ListComplianceStatusInput) (req *request.Request, output *ListComplianceStatusOutput) {
  715. op := &request.Operation{
  716. Name: opListComplianceStatus,
  717. HTTPMethod: "POST",
  718. HTTPPath: "/",
  719. }
  720. if input == nil {
  721. input = &ListComplianceStatusInput{}
  722. }
  723. output = &ListComplianceStatusOutput{}
  724. req = c.newRequest(op, input, output)
  725. return
  726. }
  727. // ListComplianceStatus API operation for Firewall Management Service.
  728. //
  729. // Returns an array of PolicyComplianceStatus objects in the response. Use PolicyComplianceStatus
  730. // to get a summary of which member accounts are protected by the specified
  731. // policy.
  732. //
  733. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  734. // with awserr.Error's Code and Message methods to get detailed information about
  735. // the error.
  736. //
  737. // See the AWS API reference guide for Firewall Management Service's
  738. // API operation ListComplianceStatus for usage and error information.
  739. //
  740. // Returned Error Codes:
  741. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  742. // The specified resource was not found.
  743. //
  744. // * ErrCodeInternalErrorException "InternalErrorException"
  745. // The operation failed because of a system problem, even though the request
  746. // was valid. Retry your request.
  747. //
  748. // See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/ListComplianceStatus
  749. func (c *FMS) ListComplianceStatus(input *ListComplianceStatusInput) (*ListComplianceStatusOutput, error) {
  750. req, out := c.ListComplianceStatusRequest(input)
  751. return out, req.Send()
  752. }
  753. // ListComplianceStatusWithContext is the same as ListComplianceStatus with the addition of
  754. // the ability to pass a context and additional request options.
  755. //
  756. // See ListComplianceStatus for details on how to use this API operation.
  757. //
  758. // The context must be non-nil and will be used for request cancellation. If
  759. // the context is nil a panic will occur. In the future the SDK may create
  760. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  761. // for more information on using Contexts.
  762. func (c *FMS) ListComplianceStatusWithContext(ctx aws.Context, input *ListComplianceStatusInput, opts ...request.Option) (*ListComplianceStatusOutput, error) {
  763. req, out := c.ListComplianceStatusRequest(input)
  764. req.SetContext(ctx)
  765. req.ApplyOptions(opts...)
  766. return out, req.Send()
  767. }
  768. const opListMemberAccounts = "ListMemberAccounts"
  769. // ListMemberAccountsRequest generates a "aws/request.Request" representing the
  770. // client's request for the ListMemberAccounts operation. The "output" return
  771. // value will be populated with the request's response once the request completes
  772. // successfully.
  773. //
  774. // Use "Send" method on the returned Request to send the API call to the service.
  775. // the "output" return value is not valid until after Send returns without error.
  776. //
  777. // See ListMemberAccounts for more information on using the ListMemberAccounts
  778. // API call, and error handling.
  779. //
  780. // This method is useful when you want to inject custom logic or configuration
  781. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  782. //
  783. //
  784. // // Example sending a request using the ListMemberAccountsRequest method.
  785. // req, resp := client.ListMemberAccountsRequest(params)
  786. //
  787. // err := req.Send()
  788. // if err == nil { // resp is now filled
  789. // fmt.Println(resp)
  790. // }
  791. //
  792. // See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/ListMemberAccounts
  793. func (c *FMS) ListMemberAccountsRequest(input *ListMemberAccountsInput) (req *request.Request, output *ListMemberAccountsOutput) {
  794. op := &request.Operation{
  795. Name: opListMemberAccounts,
  796. HTTPMethod: "POST",
  797. HTTPPath: "/",
  798. }
  799. if input == nil {
  800. input = &ListMemberAccountsInput{}
  801. }
  802. output = &ListMemberAccountsOutput{}
  803. req = c.newRequest(op, input, output)
  804. return
  805. }
  806. // ListMemberAccounts API operation for Firewall Management Service.
  807. //
  808. // Returns a MemberAccounts object that lists the member accounts in the administrator's
  809. // AWS organization.
  810. //
  811. // The ListMemberAccounts must be submitted by the account that is set as the
  812. // AWS Firewall Manager administrator.
  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 Firewall Management Service's
  819. // API operation ListMemberAccounts for usage and error information.
  820. //
  821. // Returned Error Codes:
  822. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  823. // The specified resource was not found.
  824. //
  825. // * ErrCodeInternalErrorException "InternalErrorException"
  826. // The operation failed because of a system problem, even though the request
  827. // was valid. Retry your request.
  828. //
  829. // See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/ListMemberAccounts
  830. func (c *FMS) ListMemberAccounts(input *ListMemberAccountsInput) (*ListMemberAccountsOutput, error) {
  831. req, out := c.ListMemberAccountsRequest(input)
  832. return out, req.Send()
  833. }
  834. // ListMemberAccountsWithContext is the same as ListMemberAccounts with the addition of
  835. // the ability to pass a context and additional request options.
  836. //
  837. // See ListMemberAccounts 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 *FMS) ListMemberAccountsWithContext(ctx aws.Context, input *ListMemberAccountsInput, opts ...request.Option) (*ListMemberAccountsOutput, error) {
  844. req, out := c.ListMemberAccountsRequest(input)
  845. req.SetContext(ctx)
  846. req.ApplyOptions(opts...)
  847. return out, req.Send()
  848. }
  849. const opListPolicies = "ListPolicies"
  850. // ListPoliciesRequest generates a "aws/request.Request" representing the
  851. // client's request for the ListPolicies 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 ListPolicies for more information on using the ListPolicies
  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 ListPoliciesRequest method.
  866. // req, resp := client.ListPoliciesRequest(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/fms-2018-01-01/ListPolicies
  874. func (c *FMS) ListPoliciesRequest(input *ListPoliciesInput) (req *request.Request, output *ListPoliciesOutput) {
  875. op := &request.Operation{
  876. Name: opListPolicies,
  877. HTTPMethod: "POST",
  878. HTTPPath: "/",
  879. }
  880. if input == nil {
  881. input = &ListPoliciesInput{}
  882. }
  883. output = &ListPoliciesOutput{}
  884. req = c.newRequest(op, input, output)
  885. return
  886. }
  887. // ListPolicies API operation for Firewall Management Service.
  888. //
  889. // Returns an array of PolicySummary objects in the response.
  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 Firewall Management Service's
  896. // API operation ListPolicies for usage and error information.
  897. //
  898. // Returned Error Codes:
  899. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  900. // The specified resource was not found.
  901. //
  902. // * ErrCodeInvalidOperationException "InvalidOperationException"
  903. // The operation failed because there was nothing to do. For example, you might
  904. // have submitted an AssociateAdminAccount request, but the account ID that
  905. // you submitted was already set as the AWS Firewall Manager administrator.
  906. //
  907. // * ErrCodeLimitExceededException "LimitExceededException"
  908. // The operation exceeds a resource limit, for example, the maximum number of
  909. // policy objects that you can create for an AWS account. For more information,
  910. // see Firewall Manager Limits (http://docs.aws.amazon.com/waf/latest/developerguide/fms-limits.html)
  911. // in the AWS WAF Developer Guide.
  912. //
  913. // * ErrCodeInternalErrorException "InternalErrorException"
  914. // The operation failed because of a system problem, even though the request
  915. // was valid. Retry your request.
  916. //
  917. // See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/ListPolicies
  918. func (c *FMS) ListPolicies(input *ListPoliciesInput) (*ListPoliciesOutput, error) {
  919. req, out := c.ListPoliciesRequest(input)
  920. return out, req.Send()
  921. }
  922. // ListPoliciesWithContext is the same as ListPolicies with the addition of
  923. // the ability to pass a context and additional request options.
  924. //
  925. // See ListPolicies for details on how to use this API operation.
  926. //
  927. // The context must be non-nil and will be used for request cancellation. If
  928. // the context is nil a panic will occur. In the future the SDK may create
  929. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  930. // for more information on using Contexts.
  931. func (c *FMS) ListPoliciesWithContext(ctx aws.Context, input *ListPoliciesInput, opts ...request.Option) (*ListPoliciesOutput, error) {
  932. req, out := c.ListPoliciesRequest(input)
  933. req.SetContext(ctx)
  934. req.ApplyOptions(opts...)
  935. return out, req.Send()
  936. }
  937. const opPutNotificationChannel = "PutNotificationChannel"
  938. // PutNotificationChannelRequest generates a "aws/request.Request" representing the
  939. // client's request for the PutNotificationChannel operation. The "output" return
  940. // value will be populated with the request's response once the request completes
  941. // successfully.
  942. //
  943. // Use "Send" method on the returned Request to send the API call to the service.
  944. // the "output" return value is not valid until after Send returns without error.
  945. //
  946. // See PutNotificationChannel for more information on using the PutNotificationChannel
  947. // API call, and error handling.
  948. //
  949. // This method is useful when you want to inject custom logic or configuration
  950. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  951. //
  952. //
  953. // // Example sending a request using the PutNotificationChannelRequest method.
  954. // req, resp := client.PutNotificationChannelRequest(params)
  955. //
  956. // err := req.Send()
  957. // if err == nil { // resp is now filled
  958. // fmt.Println(resp)
  959. // }
  960. //
  961. // See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/PutNotificationChannel
  962. func (c *FMS) PutNotificationChannelRequest(input *PutNotificationChannelInput) (req *request.Request, output *PutNotificationChannelOutput) {
  963. op := &request.Operation{
  964. Name: opPutNotificationChannel,
  965. HTTPMethod: "POST",
  966. HTTPPath: "/",
  967. }
  968. if input == nil {
  969. input = &PutNotificationChannelInput{}
  970. }
  971. output = &PutNotificationChannelOutput{}
  972. req = c.newRequest(op, input, output)
  973. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  974. return
  975. }
  976. // PutNotificationChannel API operation for Firewall Management Service.
  977. //
  978. // Designates the IAM role and Amazon Simple Notification Service (SNS) topic
  979. // that AWS Firewall Manager uses to record SNS logs.
  980. //
  981. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  982. // with awserr.Error's Code and Message methods to get detailed information about
  983. // the error.
  984. //
  985. // See the AWS API reference guide for Firewall Management Service's
  986. // API operation PutNotificationChannel for usage and error information.
  987. //
  988. // Returned Error Codes:
  989. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  990. // The specified resource was not found.
  991. //
  992. // * ErrCodeInvalidOperationException "InvalidOperationException"
  993. // The operation failed because there was nothing to do. For example, you might
  994. // have submitted an AssociateAdminAccount request, but the account ID that
  995. // you submitted was already set as the AWS Firewall Manager administrator.
  996. //
  997. // * ErrCodeInternalErrorException "InternalErrorException"
  998. // The operation failed because of a system problem, even though the request
  999. // was valid. Retry your request.
  1000. //
  1001. // See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/PutNotificationChannel
  1002. func (c *FMS) PutNotificationChannel(input *PutNotificationChannelInput) (*PutNotificationChannelOutput, error) {
  1003. req, out := c.PutNotificationChannelRequest(input)
  1004. return out, req.Send()
  1005. }
  1006. // PutNotificationChannelWithContext is the same as PutNotificationChannel with the addition of
  1007. // the ability to pass a context and additional request options.
  1008. //
  1009. // See PutNotificationChannel for details on how to use this API operation.
  1010. //
  1011. // The context must be non-nil and will be used for request cancellation. If
  1012. // the context is nil a panic will occur. In the future the SDK may create
  1013. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1014. // for more information on using Contexts.
  1015. func (c *FMS) PutNotificationChannelWithContext(ctx aws.Context, input *PutNotificationChannelInput, opts ...request.Option) (*PutNotificationChannelOutput, error) {
  1016. req, out := c.PutNotificationChannelRequest(input)
  1017. req.SetContext(ctx)
  1018. req.ApplyOptions(opts...)
  1019. return out, req.Send()
  1020. }
  1021. const opPutPolicy = "PutPolicy"
  1022. // PutPolicyRequest generates a "aws/request.Request" representing the
  1023. // client's request for the PutPolicy operation. The "output" return
  1024. // value will be populated with the request's response once the request completes
  1025. // successfully.
  1026. //
  1027. // Use "Send" method on the returned Request to send the API call to the service.
  1028. // the "output" return value is not valid until after Send returns without error.
  1029. //
  1030. // See PutPolicy for more information on using the PutPolicy
  1031. // API call, and error handling.
  1032. //
  1033. // This method is useful when you want to inject custom logic or configuration
  1034. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1035. //
  1036. //
  1037. // // Example sending a request using the PutPolicyRequest method.
  1038. // req, resp := client.PutPolicyRequest(params)
  1039. //
  1040. // err := req.Send()
  1041. // if err == nil { // resp is now filled
  1042. // fmt.Println(resp)
  1043. // }
  1044. //
  1045. // See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/PutPolicy
  1046. func (c *FMS) PutPolicyRequest(input *PutPolicyInput) (req *request.Request, output *PutPolicyOutput) {
  1047. op := &request.Operation{
  1048. Name: opPutPolicy,
  1049. HTTPMethod: "POST",
  1050. HTTPPath: "/",
  1051. }
  1052. if input == nil {
  1053. input = &PutPolicyInput{}
  1054. }
  1055. output = &PutPolicyOutput{}
  1056. req = c.newRequest(op, input, output)
  1057. return
  1058. }
  1059. // PutPolicy API operation for Firewall Management Service.
  1060. //
  1061. // Creates an AWS Firewall Manager policy.
  1062. //
  1063. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1064. // with awserr.Error's Code and Message methods to get detailed information about
  1065. // the error.
  1066. //
  1067. // See the AWS API reference guide for Firewall Management Service's
  1068. // API operation PutPolicy for usage and error information.
  1069. //
  1070. // Returned Error Codes:
  1071. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1072. // The specified resource was not found.
  1073. //
  1074. // * ErrCodeInvalidOperationException "InvalidOperationException"
  1075. // The operation failed because there was nothing to do. For example, you might
  1076. // have submitted an AssociateAdminAccount request, but the account ID that
  1077. // you submitted was already set as the AWS Firewall Manager administrator.
  1078. //
  1079. // * ErrCodeInvalidInputException "InvalidInputException"
  1080. // The parameters of the request were invalid.
  1081. //
  1082. // * ErrCodeLimitExceededException "LimitExceededException"
  1083. // The operation exceeds a resource limit, for example, the maximum number of
  1084. // policy objects that you can create for an AWS account. For more information,
  1085. // see Firewall Manager Limits (http://docs.aws.amazon.com/waf/latest/developerguide/fms-limits.html)
  1086. // in the AWS WAF Developer Guide.
  1087. //
  1088. // * ErrCodeInternalErrorException "InternalErrorException"
  1089. // The operation failed because of a system problem, even though the request
  1090. // was valid. Retry your request.
  1091. //
  1092. // * ErrCodeInvalidTypeException "InvalidTypeException"
  1093. // The value of the Type parameter is invalid.
  1094. //
  1095. // See also, https://docs.aws.amazon.com/goto/WebAPI/fms-2018-01-01/PutPolicy
  1096. func (c *FMS) PutPolicy(input *PutPolicyInput) (*PutPolicyOutput, error) {
  1097. req, out := c.PutPolicyRequest(input)
  1098. return out, req.Send()
  1099. }
  1100. // PutPolicyWithContext is the same as PutPolicy with the addition of
  1101. // the ability to pass a context and additional request options.
  1102. //
  1103. // See PutPolicy for details on how to use this API operation.
  1104. //
  1105. // The context must be non-nil and will be used for request cancellation. If
  1106. // the context is nil a panic will occur. In the future the SDK may create
  1107. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1108. // for more information on using Contexts.
  1109. func (c *FMS) PutPolicyWithContext(ctx aws.Context, input *PutPolicyInput, opts ...request.Option) (*PutPolicyOutput, error) {
  1110. req, out := c.PutPolicyRequest(input)
  1111. req.SetContext(ctx)
  1112. req.ApplyOptions(opts...)
  1113. return out, req.Send()
  1114. }
  1115. type AssociateAdminAccountInput struct {
  1116. _ struct{} `type:"structure"`
  1117. // The AWS account ID to associate with AWS Firewall Manager as the AWS Firewall
  1118. // Manager administrator account. This can be an AWS Organizations master account
  1119. // or a member account. For more information about AWS Organizations and master
  1120. // accounts, see Managing the AWS Accounts in Your Organization (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_accounts.html).
  1121. //
  1122. // AdminAccount is a required field
  1123. AdminAccount *string `min:"1" type:"string" required:"true"`
  1124. }
  1125. // String returns the string representation
  1126. func (s AssociateAdminAccountInput) String() string {
  1127. return awsutil.Prettify(s)
  1128. }
  1129. // GoString returns the string representation
  1130. func (s AssociateAdminAccountInput) GoString() string {
  1131. return s.String()
  1132. }
  1133. // Validate inspects the fields of the type to determine if they are valid.
  1134. func (s *AssociateAdminAccountInput) Validate() error {
  1135. invalidParams := request.ErrInvalidParams{Context: "AssociateAdminAccountInput"}
  1136. if s.AdminAccount == nil {
  1137. invalidParams.Add(request.NewErrParamRequired("AdminAccount"))
  1138. }
  1139. if s.AdminAccount != nil && len(*s.AdminAccount) < 1 {
  1140. invalidParams.Add(request.NewErrParamMinLen("AdminAccount", 1))
  1141. }
  1142. if invalidParams.Len() > 0 {
  1143. return invalidParams
  1144. }
  1145. return nil
  1146. }
  1147. // SetAdminAccount sets the AdminAccount field's value.
  1148. func (s *AssociateAdminAccountInput) SetAdminAccount(v string) *AssociateAdminAccountInput {
  1149. s.AdminAccount = &v
  1150. return s
  1151. }
  1152. type AssociateAdminAccountOutput struct {
  1153. _ struct{} `type:"structure"`
  1154. }
  1155. // String returns the string representation
  1156. func (s AssociateAdminAccountOutput) String() string {
  1157. return awsutil.Prettify(s)
  1158. }
  1159. // GoString returns the string representation
  1160. func (s AssociateAdminAccountOutput) GoString() string {
  1161. return s.String()
  1162. }
  1163. // Details of the resource that is not protected by the policy.
  1164. type ComplianceViolator struct {
  1165. _ struct{} `type:"structure"`
  1166. // The resource ID.
  1167. ResourceId *string `min:"1" type:"string"`
  1168. // The resource type. This is in the format shown in AWS Resource Types Reference
  1169. // (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html).
  1170. // Valid values are AWS::ElasticLoadBalancingV2::LoadBalancer or AWS::CloudFront::Distribution.
  1171. ResourceType *string `min:"1" type:"string"`
  1172. // The reason that the resource is not protected by the policy.
  1173. ViolationReason *string `type:"string" enum:"ViolationReason"`
  1174. }
  1175. // String returns the string representation
  1176. func (s ComplianceViolator) String() string {
  1177. return awsutil.Prettify(s)
  1178. }
  1179. // GoString returns the string representation
  1180. func (s ComplianceViolator) GoString() string {
  1181. return s.String()
  1182. }
  1183. // SetResourceId sets the ResourceId field's value.
  1184. func (s *ComplianceViolator) SetResourceId(v string) *ComplianceViolator {
  1185. s.ResourceId = &v
  1186. return s
  1187. }
  1188. // SetResourceType sets the ResourceType field's value.
  1189. func (s *ComplianceViolator) SetResourceType(v string) *ComplianceViolator {
  1190. s.ResourceType = &v
  1191. return s
  1192. }
  1193. // SetViolationReason sets the ViolationReason field's value.
  1194. func (s *ComplianceViolator) SetViolationReason(v string) *ComplianceViolator {
  1195. s.ViolationReason = &v
  1196. return s
  1197. }
  1198. type DeleteNotificationChannelInput struct {
  1199. _ struct{} `type:"structure"`
  1200. }
  1201. // String returns the string representation
  1202. func (s DeleteNotificationChannelInput) String() string {
  1203. return awsutil.Prettify(s)
  1204. }
  1205. // GoString returns the string representation
  1206. func (s DeleteNotificationChannelInput) GoString() string {
  1207. return s.String()
  1208. }
  1209. type DeleteNotificationChannelOutput struct {
  1210. _ struct{} `type:"structure"`
  1211. }
  1212. // String returns the string representation
  1213. func (s DeleteNotificationChannelOutput) String() string {
  1214. return awsutil.Prettify(s)
  1215. }
  1216. // GoString returns the string representation
  1217. func (s DeleteNotificationChannelOutput) GoString() string {
  1218. return s.String()
  1219. }
  1220. type DeletePolicyInput struct {
  1221. _ struct{} `type:"structure"`
  1222. // If True, the request will also delete all web ACLs in this policy. Associated
  1223. // resources will no longer be protected by web ACLs in this policy.
  1224. DeleteAllPolicyResources *bool `type:"boolean"`
  1225. // The ID of the policy that you want to delete. PolicyId is returned by PutPolicy
  1226. // and by ListPolicies.
  1227. //
  1228. // PolicyId is a required field
  1229. PolicyId *string `min:"36" type:"string" required:"true"`
  1230. }
  1231. // String returns the string representation
  1232. func (s DeletePolicyInput) String() string {
  1233. return awsutil.Prettify(s)
  1234. }
  1235. // GoString returns the string representation
  1236. func (s DeletePolicyInput) GoString() string {
  1237. return s.String()
  1238. }
  1239. // Validate inspects the fields of the type to determine if they are valid.
  1240. func (s *DeletePolicyInput) Validate() error {
  1241. invalidParams := request.ErrInvalidParams{Context: "DeletePolicyInput"}
  1242. if s.PolicyId == nil {
  1243. invalidParams.Add(request.NewErrParamRequired("PolicyId"))
  1244. }
  1245. if s.PolicyId != nil && len(*s.PolicyId) < 36 {
  1246. invalidParams.Add(request.NewErrParamMinLen("PolicyId", 36))
  1247. }
  1248. if invalidParams.Len() > 0 {
  1249. return invalidParams
  1250. }
  1251. return nil
  1252. }
  1253. // SetDeleteAllPolicyResources sets the DeleteAllPolicyResources field's value.
  1254. func (s *DeletePolicyInput) SetDeleteAllPolicyResources(v bool) *DeletePolicyInput {
  1255. s.DeleteAllPolicyResources = &v
  1256. return s
  1257. }
  1258. // SetPolicyId sets the PolicyId field's value.
  1259. func (s *DeletePolicyInput) SetPolicyId(v string) *DeletePolicyInput {
  1260. s.PolicyId = &v
  1261. return s
  1262. }
  1263. type DeletePolicyOutput struct {
  1264. _ struct{} `type:"structure"`
  1265. }
  1266. // String returns the string representation
  1267. func (s DeletePolicyOutput) String() string {
  1268. return awsutil.Prettify(s)
  1269. }
  1270. // GoString returns the string representation
  1271. func (s DeletePolicyOutput) GoString() string {
  1272. return s.String()
  1273. }
  1274. type DisassociateAdminAccountInput struct {
  1275. _ struct{} `type:"structure"`
  1276. }
  1277. // String returns the string representation
  1278. func (s DisassociateAdminAccountInput) String() string {
  1279. return awsutil.Prettify(s)
  1280. }
  1281. // GoString returns the string representation
  1282. func (s DisassociateAdminAccountInput) GoString() string {
  1283. return s.String()
  1284. }
  1285. type DisassociateAdminAccountOutput struct {
  1286. _ struct{} `type:"structure"`
  1287. }
  1288. // String returns the string representation
  1289. func (s DisassociateAdminAccountOutput) String() string {
  1290. return awsutil.Prettify(s)
  1291. }
  1292. // GoString returns the string representation
  1293. func (s DisassociateAdminAccountOutput) GoString() string {
  1294. return s.String()
  1295. }
  1296. // Describes the compliance status for the account. An account is considered
  1297. // non-compliant if it includes resources that are not protected by the specified
  1298. // policy.
  1299. type EvaluationResult struct {
  1300. _ struct{} `type:"structure"`
  1301. // Describes an AWS account's compliance with the AWS Firewall Manager policy.
  1302. ComplianceStatus *string `type:"string" enum:"PolicyComplianceStatusType"`
  1303. // Indicates that over 100 resources are non-compliant with the AWS Firewall
  1304. // Manager policy.
  1305. EvaluationLimitExceeded *bool `type:"boolean"`
  1306. // Number of resources that are non-compliant with the specified policy. A resource
  1307. // is considered non-compliant if it is not associated with the specified policy.
  1308. ViolatorCount *int64 `type:"long"`
  1309. }
  1310. // String returns the string representation
  1311. func (s EvaluationResult) String() string {
  1312. return awsutil.Prettify(s)
  1313. }
  1314. // GoString returns the string representation
  1315. func (s EvaluationResult) GoString() string {
  1316. return s.String()
  1317. }
  1318. // SetComplianceStatus sets the ComplianceStatus field's value.
  1319. func (s *EvaluationResult) SetComplianceStatus(v string) *EvaluationResult {
  1320. s.ComplianceStatus = &v
  1321. return s
  1322. }
  1323. // SetEvaluationLimitExceeded sets the EvaluationLimitExceeded field's value.
  1324. func (s *EvaluationResult) SetEvaluationLimitExceeded(v bool) *EvaluationResult {
  1325. s.EvaluationLimitExceeded = &v
  1326. return s
  1327. }
  1328. // SetViolatorCount sets the ViolatorCount field's value.
  1329. func (s *EvaluationResult) SetViolatorCount(v int64) *EvaluationResult {
  1330. s.ViolatorCount = &v
  1331. return s
  1332. }
  1333. type GetAdminAccountInput struct {
  1334. _ struct{} `type:"structure"`
  1335. }
  1336. // String returns the string representation
  1337. func (s GetAdminAccountInput) String() string {
  1338. return awsutil.Prettify(s)
  1339. }
  1340. // GoString returns the string representation
  1341. func (s GetAdminAccountInput) GoString() string {
  1342. return s.String()
  1343. }
  1344. type GetAdminAccountOutput struct {
  1345. _ struct{} `type:"structure"`
  1346. // The AWS account that is set as the AWS Firewall Manager administrator.
  1347. AdminAccount *string `min:"1" type:"string"`
  1348. // The status of the AWS account that you set as the AWS Firewall Manager administrator.
  1349. RoleStatus *string `type:"string" enum:"AccountRoleStatus"`
  1350. }
  1351. // String returns the string representation
  1352. func (s GetAdminAccountOutput) String() string {
  1353. return awsutil.Prettify(s)
  1354. }
  1355. // GoString returns the string representation
  1356. func (s GetAdminAccountOutput) GoString() string {
  1357. return s.String()
  1358. }
  1359. // SetAdminAccount sets the AdminAccount field's value.
  1360. func (s *GetAdminAccountOutput) SetAdminAccount(v string) *GetAdminAccountOutput {
  1361. s.AdminAccount = &v
  1362. return s
  1363. }
  1364. // SetRoleStatus sets the RoleStatus field's value.
  1365. func (s *GetAdminAccountOutput) SetRoleStatus(v string) *GetAdminAccountOutput {
  1366. s.RoleStatus = &v
  1367. return s
  1368. }
  1369. type GetComplianceDetailInput struct {
  1370. _ struct{} `type:"structure"`
  1371. // The AWS account that owns the resources that you want to get the details
  1372. // for.
  1373. //
  1374. // MemberAccount is a required field
  1375. MemberAccount *string `min:"1" type:"string" required:"true"`
  1376. // The ID of the policy that you want to get the details for. PolicyId is returned
  1377. // by PutPolicy and by ListPolicies.
  1378. //
  1379. // PolicyId is a required field
  1380. PolicyId *string `min:"36" type:"string" required:"true"`
  1381. }
  1382. // String returns the string representation
  1383. func (s GetComplianceDetailInput) String() string {
  1384. return awsutil.Prettify(s)
  1385. }
  1386. // GoString returns the string representation
  1387. func (s GetComplianceDetailInput) GoString() string {
  1388. return s.String()
  1389. }
  1390. // Validate inspects the fields of the type to determine if they are valid.
  1391. func (s *GetComplianceDetailInput) Validate() error {
  1392. invalidParams := request.ErrInvalidParams{Context: "GetComplianceDetailInput"}
  1393. if s.MemberAccount == nil {
  1394. invalidParams.Add(request.NewErrParamRequired("MemberAccount"))
  1395. }
  1396. if s.MemberAccount != nil && len(*s.MemberAccount) < 1 {
  1397. invalidParams.Add(request.NewErrParamMinLen("MemberAccount", 1))
  1398. }
  1399. if s.PolicyId == nil {
  1400. invalidParams.Add(request.NewErrParamRequired("PolicyId"))
  1401. }
  1402. if s.PolicyId != nil && len(*s.PolicyId) < 36 {
  1403. invalidParams.Add(request.NewErrParamMinLen("PolicyId", 36))
  1404. }
  1405. if invalidParams.Len() > 0 {
  1406. return invalidParams
  1407. }
  1408. return nil
  1409. }
  1410. // SetMemberAccount sets the MemberAccount field's value.
  1411. func (s *GetComplianceDetailInput) SetMemberAccount(v string) *GetComplianceDetailInput {
  1412. s.MemberAccount = &v
  1413. return s
  1414. }
  1415. // SetPolicyId sets the PolicyId field's value.
  1416. func (s *GetComplianceDetailInput) SetPolicyId(v string) *GetComplianceDetailInput {
  1417. s.PolicyId = &v
  1418. return s
  1419. }
  1420. type GetComplianceDetailOutput struct {
  1421. _ struct{} `type:"structure"`
  1422. // Information about the resources and the policy that you specified in the
  1423. // GetComplianceDetail request.
  1424. PolicyComplianceDetail *PolicyComplianceDetail `type:"structure"`
  1425. }
  1426. // String returns the string representation
  1427. func (s GetComplianceDetailOutput) String() string {
  1428. return awsutil.Prettify(s)
  1429. }
  1430. // GoString returns the string representation
  1431. func (s GetComplianceDetailOutput) GoString() string {
  1432. return s.String()
  1433. }
  1434. // SetPolicyComplianceDetail sets the PolicyComplianceDetail field's value.
  1435. func (s *GetComplianceDetailOutput) SetPolicyComplianceDetail(v *PolicyComplianceDetail) *GetComplianceDetailOutput {
  1436. s.PolicyComplianceDetail = v
  1437. return s
  1438. }
  1439. type GetNotificationChannelInput struct {
  1440. _ struct{} `type:"structure"`
  1441. }
  1442. // String returns the string representation
  1443. func (s GetNotificationChannelInput) String() string {
  1444. return awsutil.Prettify(s)
  1445. }
  1446. // GoString returns the string representation
  1447. func (s GetNotificationChannelInput) GoString() string {
  1448. return s.String()
  1449. }
  1450. type GetNotificationChannelOutput struct {
  1451. _ struct{} `type:"structure"`
  1452. // The IAM role that is used by AWS Firewall Manager to record activity to SNS.
  1453. SnsRoleName *string `min:"1" type:"string"`
  1454. // The SNS topic that records AWS Firewall Manager activity.
  1455. SnsTopicArn *string `min:"1" type:"string"`
  1456. }
  1457. // String returns the string representation
  1458. func (s GetNotificationChannelOutput) String() string {
  1459. return awsutil.Prettify(s)
  1460. }
  1461. // GoString returns the string representation
  1462. func (s GetNotificationChannelOutput) GoString() string {
  1463. return s.String()
  1464. }
  1465. // SetSnsRoleName sets the SnsRoleName field's value.
  1466. func (s *GetNotificationChannelOutput) SetSnsRoleName(v string) *GetNotificationChannelOutput {
  1467. s.SnsRoleName = &v
  1468. return s
  1469. }
  1470. // SetSnsTopicArn sets the SnsTopicArn field's value.
  1471. func (s *GetNotificationChannelOutput) SetSnsTopicArn(v string) *GetNotificationChannelOutput {
  1472. s.SnsTopicArn = &v
  1473. return s
  1474. }
  1475. type GetPolicyInput struct {
  1476. _ struct{} `type:"structure"`
  1477. // The ID of the AWS Firewall Manager policy that you want the details for.
  1478. //
  1479. // PolicyId is a required field
  1480. PolicyId *string `min:"36" type:"string" required:"true"`
  1481. }
  1482. // String returns the string representation
  1483. func (s GetPolicyInput) String() string {
  1484. return awsutil.Prettify(s)
  1485. }
  1486. // GoString returns the string representation
  1487. func (s GetPolicyInput) GoString() string {
  1488. return s.String()
  1489. }
  1490. // Validate inspects the fields of the type to determine if they are valid.
  1491. func (s *GetPolicyInput) Validate() error {
  1492. invalidParams := request.ErrInvalidParams{Context: "GetPolicyInput"}
  1493. if s.PolicyId == nil {
  1494. invalidParams.Add(request.NewErrParamRequired("PolicyId"))
  1495. }
  1496. if s.PolicyId != nil && len(*s.PolicyId) < 36 {
  1497. invalidParams.Add(request.NewErrParamMinLen("PolicyId", 36))
  1498. }
  1499. if invalidParams.Len() > 0 {
  1500. return invalidParams
  1501. }
  1502. return nil
  1503. }
  1504. // SetPolicyId sets the PolicyId field's value.
  1505. func (s *GetPolicyInput) SetPolicyId(v string) *GetPolicyInput {
  1506. s.PolicyId = &v
  1507. return s
  1508. }
  1509. type GetPolicyOutput struct {
  1510. _ struct{} `type:"structure"`
  1511. // Information about the specified AWS Firewall Manager policy.
  1512. Policy *Policy `type:"structure"`
  1513. // The Amazon Resource Name (ARN) of the specified policy.
  1514. PolicyArn *string `min:"1" type:"string"`
  1515. }
  1516. // String returns the string representation
  1517. func (s GetPolicyOutput) String() string {
  1518. return awsutil.Prettify(s)
  1519. }
  1520. // GoString returns the string representation
  1521. func (s GetPolicyOutput) GoString() string {
  1522. return s.String()
  1523. }
  1524. // SetPolicy sets the Policy field's value.
  1525. func (s *GetPolicyOutput) SetPolicy(v *Policy) *GetPolicyOutput {
  1526. s.Policy = v
  1527. return s
  1528. }
  1529. // SetPolicyArn sets the PolicyArn field's value.
  1530. func (s *GetPolicyOutput) SetPolicyArn(v string) *GetPolicyOutput {
  1531. s.PolicyArn = &v
  1532. return s
  1533. }
  1534. type ListComplianceStatusInput struct {
  1535. _ struct{} `type:"structure"`
  1536. // Specifies the number of PolicyComplianceStatus objects that you want AWS
  1537. // Firewall Manager to return for this request. If you have more PolicyComplianceStatus
  1538. // objects than the number that you specify for MaxResults, the response includes
  1539. // a NextToken value that you can use to get another batch of PolicyComplianceStatus
  1540. // objects.
  1541. MaxResults *int64 `min:"1" type:"integer"`
  1542. // If you specify a value for MaxResults and you have more PolicyComplianceStatus
  1543. // objects than the number that you specify for MaxResults, AWS Firewall Manager
  1544. // returns a NextToken value in the response that allows you to list another
  1545. // group of PolicyComplianceStatus objects. For the second and subsequent ListComplianceStatus
  1546. // requests, specify the value of NextToken from the previous response to get
  1547. // information about another batch of PolicyComplianceStatus objects.
  1548. NextToken *string `min:"1" type:"string"`
  1549. // The ID of the AWS Firewall Manager policy that you want the details for.
  1550. //
  1551. // PolicyId is a required field
  1552. PolicyId *string `min:"36" type:"string" required:"true"`
  1553. }
  1554. // String returns the string representation
  1555. func (s ListComplianceStatusInput) String() string {
  1556. return awsutil.Prettify(s)
  1557. }
  1558. // GoString returns the string representation
  1559. func (s ListComplianceStatusInput) GoString() string {
  1560. return s.String()
  1561. }
  1562. // Validate inspects the fields of the type to determine if they are valid.
  1563. func (s *ListComplianceStatusInput) Validate() error {
  1564. invalidParams := request.ErrInvalidParams{Context: "ListComplianceStatusInput"}
  1565. if s.MaxResults != nil && *s.MaxResults < 1 {
  1566. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  1567. }
  1568. if s.NextToken != nil && len(*s.NextToken) < 1 {
  1569. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  1570. }
  1571. if s.PolicyId == nil {
  1572. invalidParams.Add(request.NewErrParamRequired("PolicyId"))
  1573. }
  1574. if s.PolicyId != nil && len(*s.PolicyId) < 36 {
  1575. invalidParams.Add(request.NewErrParamMinLen("PolicyId", 36))
  1576. }
  1577. if invalidParams.Len() > 0 {
  1578. return invalidParams
  1579. }
  1580. return nil
  1581. }
  1582. // SetMaxResults sets the MaxResults field's value.
  1583. func (s *ListComplianceStatusInput) SetMaxResults(v int64) *ListComplianceStatusInput {
  1584. s.MaxResults = &v
  1585. return s
  1586. }
  1587. // SetNextToken sets the NextToken field's value.
  1588. func (s *ListComplianceStatusInput) SetNextToken(v string) *ListComplianceStatusInput {
  1589. s.NextToken = &v
  1590. return s
  1591. }
  1592. // SetPolicyId sets the PolicyId field's value.
  1593. func (s *ListComplianceStatusInput) SetPolicyId(v string) *ListComplianceStatusInput {
  1594. s.PolicyId = &v
  1595. return s
  1596. }
  1597. type ListComplianceStatusOutput struct {
  1598. _ struct{} `type:"structure"`
  1599. // If you have more PolicyComplianceStatus objects than the number that you
  1600. // specified for MaxResults in the request, the response includes a NextToken
  1601. // value. To list more PolicyComplianceStatus objects, submit another ListComplianceStatus
  1602. // request, and specify the NextToken value from the response in the NextToken
  1603. // value in the next request.
  1604. NextToken *string `min:"1" type:"string"`
  1605. // An array of PolicyComplianceStatus objects.
  1606. PolicyComplianceStatusList []*PolicyComplianceStatus `type:"list"`
  1607. }
  1608. // String returns the string representation
  1609. func (s ListComplianceStatusOutput) String() string {
  1610. return awsutil.Prettify(s)
  1611. }
  1612. // GoString returns the string representation
  1613. func (s ListComplianceStatusOutput) GoString() string {
  1614. return s.String()
  1615. }
  1616. // SetNextToken sets the NextToken field's value.
  1617. func (s *ListComplianceStatusOutput) SetNextToken(v string) *ListComplianceStatusOutput {
  1618. s.NextToken = &v
  1619. return s
  1620. }
  1621. // SetPolicyComplianceStatusList sets the PolicyComplianceStatusList field's value.
  1622. func (s *ListComplianceStatusOutput) SetPolicyComplianceStatusList(v []*PolicyComplianceStatus) *ListComplianceStatusOutput {
  1623. s.PolicyComplianceStatusList = v
  1624. return s
  1625. }
  1626. type ListMemberAccountsInput struct {
  1627. _ struct{} `type:"structure"`
  1628. // Specifies the number of member account IDs that you want AWS Firewall Manager
  1629. // to return for this request. If you have more IDs than the number that you
  1630. // specify for MaxResults, the response includes a NextToken value that you
  1631. // can use to get another batch of member account IDs.
  1632. MaxResults *int64 `min:"1" type:"integer"`
  1633. // If you specify a value for MaxResults and you have more account IDs than
  1634. // the number that you specify for MaxResults, AWS Firewall Manager returns
  1635. // a NextToken value in the response that allows you to list another group of
  1636. // IDs. For the second and subsequent ListMemberAccountsRequest requests, specify
  1637. // the value of NextToken from the previous response to get information about
  1638. // another batch of member account IDs.
  1639. NextToken *string `min:"1" type:"string"`
  1640. }
  1641. // String returns the string representation
  1642. func (s ListMemberAccountsInput) String() string {
  1643. return awsutil.Prettify(s)
  1644. }
  1645. // GoString returns the string representation
  1646. func (s ListMemberAccountsInput) GoString() string {
  1647. return s.String()
  1648. }
  1649. // Validate inspects the fields of the type to determine if they are valid.
  1650. func (s *ListMemberAccountsInput) Validate() error {
  1651. invalidParams := request.ErrInvalidParams{Context: "ListMemberAccountsInput"}
  1652. if s.MaxResults != nil && *s.MaxResults < 1 {
  1653. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  1654. }
  1655. if s.NextToken != nil && len(*s.NextToken) < 1 {
  1656. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  1657. }
  1658. if invalidParams.Len() > 0 {
  1659. return invalidParams
  1660. }
  1661. return nil
  1662. }
  1663. // SetMaxResults sets the MaxResults field's value.
  1664. func (s *ListMemberAccountsInput) SetMaxResults(v int64) *ListMemberAccountsInput {
  1665. s.MaxResults = &v
  1666. return s
  1667. }
  1668. // SetNextToken sets the NextToken field's value.
  1669. func (s *ListMemberAccountsInput) SetNextToken(v string) *ListMemberAccountsInput {
  1670. s.NextToken = &v
  1671. return s
  1672. }
  1673. type ListMemberAccountsOutput struct {
  1674. _ struct{} `type:"structure"`
  1675. // An array of account IDs.
  1676. MemberAccounts []*string `type:"list"`
  1677. // If you have more member account IDs than the number that you specified for
  1678. // MaxResults in the request, the response includes a NextToken value. To list
  1679. // more IDs, submit another ListMemberAccounts request, and specify the NextToken
  1680. // value from the response in the NextToken value in the next request.
  1681. NextToken *string `min:"1" type:"string"`
  1682. }
  1683. // String returns the string representation
  1684. func (s ListMemberAccountsOutput) String() string {
  1685. return awsutil.Prettify(s)
  1686. }
  1687. // GoString returns the string representation
  1688. func (s ListMemberAccountsOutput) GoString() string {
  1689. return s.String()
  1690. }
  1691. // SetMemberAccounts sets the MemberAccounts field's value.
  1692. func (s *ListMemberAccountsOutput) SetMemberAccounts(v []*string) *ListMemberAccountsOutput {
  1693. s.MemberAccounts = v
  1694. return s
  1695. }
  1696. // SetNextToken sets the NextToken field's value.
  1697. func (s *ListMemberAccountsOutput) SetNextToken(v string) *ListMemberAccountsOutput {
  1698. s.NextToken = &v
  1699. return s
  1700. }
  1701. type ListPoliciesInput struct {
  1702. _ struct{} `type:"structure"`
  1703. // Specifies the number of PolicySummary objects that you want AWS Firewall
  1704. // Manager to return for this request. If you have more PolicySummary objects
  1705. // than the number that you specify for MaxResults, the response includes a
  1706. // NextToken value that you can use to get another batch of PolicySummary objects.
  1707. MaxResults *int64 `min:"1" type:"integer"`
  1708. // If you specify a value for MaxResults and you have more PolicySummary objects
  1709. // than the number that you specify for MaxResults, AWS Firewall Manager returns
  1710. // a NextToken value in the response that allows you to list another group of
  1711. // PolicySummary objects. For the second and subsequent ListPolicies requests,
  1712. // specify the value of NextToken from the previous response to get information
  1713. // about another batch of PolicySummary objects.
  1714. NextToken *string `min:"1" type:"string"`
  1715. }
  1716. // String returns the string representation
  1717. func (s ListPoliciesInput) String() string {
  1718. return awsutil.Prettify(s)
  1719. }
  1720. // GoString returns the string representation
  1721. func (s ListPoliciesInput) GoString() string {
  1722. return s.String()
  1723. }
  1724. // Validate inspects the fields of the type to determine if they are valid.
  1725. func (s *ListPoliciesInput) Validate() error {
  1726. invalidParams := request.ErrInvalidParams{Context: "ListPoliciesInput"}
  1727. if s.MaxResults != nil && *s.MaxResults < 1 {
  1728. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  1729. }
  1730. if s.NextToken != nil && len(*s.NextToken) < 1 {
  1731. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  1732. }
  1733. if invalidParams.Len() > 0 {
  1734. return invalidParams
  1735. }
  1736. return nil
  1737. }
  1738. // SetMaxResults sets the MaxResults field's value.
  1739. func (s *ListPoliciesInput) SetMaxResults(v int64) *ListPoliciesInput {
  1740. s.MaxResults = &v
  1741. return s
  1742. }
  1743. // SetNextToken sets the NextToken field's value.
  1744. func (s *ListPoliciesInput) SetNextToken(v string) *ListPoliciesInput {
  1745. s.NextToken = &v
  1746. return s
  1747. }
  1748. type ListPoliciesOutput struct {
  1749. _ struct{} `type:"structure"`
  1750. // If you have more PolicySummary objects than the number that you specified
  1751. // for MaxResults in the request, the response includes a NextToken value. To
  1752. // list more PolicySummary objects, submit another ListPolicies request, and
  1753. // specify the NextToken value from the response in the NextToken value in the
  1754. // next request.
  1755. NextToken *string `min:"1" type:"string"`
  1756. // An array of PolicySummary objects.
  1757. PolicyList []*PolicySummary `type:"list"`
  1758. }
  1759. // String returns the string representation
  1760. func (s ListPoliciesOutput) String() string {
  1761. return awsutil.Prettify(s)
  1762. }
  1763. // GoString returns the string representation
  1764. func (s ListPoliciesOutput) GoString() string {
  1765. return s.String()
  1766. }
  1767. // SetNextToken sets the NextToken field's value.
  1768. func (s *ListPoliciesOutput) SetNextToken(v string) *ListPoliciesOutput {
  1769. s.NextToken = &v
  1770. return s
  1771. }
  1772. // SetPolicyList sets the PolicyList field's value.
  1773. func (s *ListPoliciesOutput) SetPolicyList(v []*PolicySummary) *ListPoliciesOutput {
  1774. s.PolicyList = v
  1775. return s
  1776. }
  1777. // An AWS Firewall Manager policy.
  1778. type Policy struct {
  1779. _ struct{} `type:"structure"`
  1780. // Specifies the AWS account IDs to exclude from the policy. The IncludeMap
  1781. // values are evaluated first, with all the appropriate account IDs added to
  1782. // the policy. Then the accounts listed in ExcludeMap are removed, resulting
  1783. // in the final list of accounts to add to the policy.
  1784. //
  1785. // The key to the map is ACCOUNT. For example, a valid ExcludeMap would be {“ACCOUNT”
  1786. // : [“accountID1”, “accountID2”]}.
  1787. ExcludeMap map[string][]*string `type:"map"`
  1788. // If set to True, resources with the tags that are specified in the ResourceTag
  1789. // array are not protected by the policy. If set to False, and the ResourceTag
  1790. // array is not null, only resources with the specified tags are associated
  1791. // with the policy.
  1792. //
  1793. // ExcludeResourceTags is a required field
  1794. ExcludeResourceTags *bool `type:"boolean" required:"true"`
  1795. // Specifies the AWS account IDs to include in the policy. If IncludeMap is
  1796. // null, all accounts in the organization in AWS Organizations are included
  1797. // in the policy. If IncludeMap is not null, only values listed in IncludeMap
  1798. // are included in the policy.
  1799. //
  1800. // The key to the map is ACCOUNT. For example, a valid IncludeMap would be {“ACCOUNT”
  1801. // : [“accountID1”, “accountID2”]}.
  1802. IncludeMap map[string][]*string `type:"map"`
  1803. // The ID of the AWS Firewall Manager policy.
  1804. PolicyId *string `min:"36" type:"string"`
  1805. // The friendly name of the AWS Firewall Manager policy.
  1806. //
  1807. // PolicyName is a required field
  1808. PolicyName *string `min:"1" type:"string" required:"true"`
  1809. // A unique identifier for each update to the policy. When issuing a PutPolicy
  1810. // request, the PolicyUpdateToken in the request must match the PolicyUpdateToken
  1811. // of the current policy version. To get the PolicyUpdateToken of the current
  1812. // policy version, use a GetPolicy request.
  1813. PolicyUpdateToken *string `min:"1" type:"string"`
  1814. // Indicates if the policy should be automatically applied to new resources.
  1815. //
  1816. // RemediationEnabled is a required field
  1817. RemediationEnabled *bool `type:"boolean" required:"true"`
  1818. // An array of ResourceTag objects.
  1819. ResourceTags []*ResourceTag `type:"list"`
  1820. // The type of resource to protect with the policy, either an Application Load
  1821. // Balancer or a CloudFront distribution. This is in the format shown in AWS
  1822. // Resource Types Reference (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html).
  1823. // Valid values are AWS::ElasticLoadBalancingV2::LoadBalancer or AWS::CloudFront::Distribution.
  1824. //
  1825. // ResourceType is a required field
  1826. ResourceType *string `min:"1" type:"string" required:"true"`
  1827. // Details about the security service that is being used to protect the resources.
  1828. //
  1829. // SecurityServicePolicyData is a required field
  1830. SecurityServicePolicyData *SecurityServicePolicyData `type:"structure" required:"true"`
  1831. }
  1832. // String returns the string representation
  1833. func (s Policy) String() string {
  1834. return awsutil.Prettify(s)
  1835. }
  1836. // GoString returns the string representation
  1837. func (s Policy) GoString() string {
  1838. return s.String()
  1839. }
  1840. // Validate inspects the fields of the type to determine if they are valid.
  1841. func (s *Policy) Validate() error {
  1842. invalidParams := request.ErrInvalidParams{Context: "Policy"}
  1843. if s.ExcludeResourceTags == nil {
  1844. invalidParams.Add(request.NewErrParamRequired("ExcludeResourceTags"))
  1845. }
  1846. if s.PolicyId != nil && len(*s.PolicyId) < 36 {
  1847. invalidParams.Add(request.NewErrParamMinLen("PolicyId", 36))
  1848. }
  1849. if s.PolicyName == nil {
  1850. invalidParams.Add(request.NewErrParamRequired("PolicyName"))
  1851. }
  1852. if s.PolicyName != nil && len(*s.PolicyName) < 1 {
  1853. invalidParams.Add(request.NewErrParamMinLen("PolicyName", 1))
  1854. }
  1855. if s.PolicyUpdateToken != nil && len(*s.PolicyUpdateToken) < 1 {
  1856. invalidParams.Add(request.NewErrParamMinLen("PolicyUpdateToken", 1))
  1857. }
  1858. if s.RemediationEnabled == nil {
  1859. invalidParams.Add(request.NewErrParamRequired("RemediationEnabled"))
  1860. }
  1861. if s.ResourceType == nil {
  1862. invalidParams.Add(request.NewErrParamRequired("ResourceType"))
  1863. }
  1864. if s.ResourceType != nil && len(*s.ResourceType) < 1 {
  1865. invalidParams.Add(request.NewErrParamMinLen("ResourceType", 1))
  1866. }
  1867. if s.SecurityServicePolicyData == nil {
  1868. invalidParams.Add(request.NewErrParamRequired("SecurityServicePolicyData"))
  1869. }
  1870. if s.ResourceTags != nil {
  1871. for i, v := range s.ResourceTags {
  1872. if v == nil {
  1873. continue
  1874. }
  1875. if err := v.Validate(); err != nil {
  1876. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ResourceTags", i), err.(request.ErrInvalidParams))
  1877. }
  1878. }
  1879. }
  1880. if s.SecurityServicePolicyData != nil {
  1881. if err := s.SecurityServicePolicyData.Validate(); err != nil {
  1882. invalidParams.AddNested("SecurityServicePolicyData", err.(request.ErrInvalidParams))
  1883. }
  1884. }
  1885. if invalidParams.Len() > 0 {
  1886. return invalidParams
  1887. }
  1888. return nil
  1889. }
  1890. // SetExcludeMap sets the ExcludeMap field's value.
  1891. func (s *Policy) SetExcludeMap(v map[string][]*string) *Policy {
  1892. s.ExcludeMap = v
  1893. return s
  1894. }
  1895. // SetExcludeResourceTags sets the ExcludeResourceTags field's value.
  1896. func (s *Policy) SetExcludeResourceTags(v bool) *Policy {
  1897. s.ExcludeResourceTags = &v
  1898. return s
  1899. }
  1900. // SetIncludeMap sets the IncludeMap field's value.
  1901. func (s *Policy) SetIncludeMap(v map[string][]*string) *Policy {
  1902. s.IncludeMap = v
  1903. return s
  1904. }
  1905. // SetPolicyId sets the PolicyId field's value.
  1906. func (s *Policy) SetPolicyId(v string) *Policy {
  1907. s.PolicyId = &v
  1908. return s
  1909. }
  1910. // SetPolicyName sets the PolicyName field's value.
  1911. func (s *Policy) SetPolicyName(v string) *Policy {
  1912. s.PolicyName = &v
  1913. return s
  1914. }
  1915. // SetPolicyUpdateToken sets the PolicyUpdateToken field's value.
  1916. func (s *Policy) SetPolicyUpdateToken(v string) *Policy {
  1917. s.PolicyUpdateToken = &v
  1918. return s
  1919. }
  1920. // SetRemediationEnabled sets the RemediationEnabled field's value.
  1921. func (s *Policy) SetRemediationEnabled(v bool) *Policy {
  1922. s.RemediationEnabled = &v
  1923. return s
  1924. }
  1925. // SetResourceTags sets the ResourceTags field's value.
  1926. func (s *Policy) SetResourceTags(v []*ResourceTag) *Policy {
  1927. s.ResourceTags = v
  1928. return s
  1929. }
  1930. // SetResourceType sets the ResourceType field's value.
  1931. func (s *Policy) SetResourceType(v string) *Policy {
  1932. s.ResourceType = &v
  1933. return s
  1934. }
  1935. // SetSecurityServicePolicyData sets the SecurityServicePolicyData field's value.
  1936. func (s *Policy) SetSecurityServicePolicyData(v *SecurityServicePolicyData) *Policy {
  1937. s.SecurityServicePolicyData = v
  1938. return s
  1939. }
  1940. // Describes the non-compliant resources in a member account for a specific
  1941. // AWS Firewall Manager policy. A maximum of 100 entries are displayed. If more
  1942. // than 100 resources are non-compliant, EvaluationLimitExceeded is set to True.
  1943. type PolicyComplianceDetail struct {
  1944. _ struct{} `type:"structure"`
  1945. // Indicates if over 100 resources are non-compliant with the AWS Firewall Manager
  1946. // policy.
  1947. EvaluationLimitExceeded *bool `type:"boolean"`
  1948. // A time stamp that indicates when the returned information should be considered
  1949. // out-of-date.
  1950. ExpiredAt *time.Time `type:"timestamp"`
  1951. // Details about problems with dependent services, such as AWS WAF or AWS Config,
  1952. // that are causing a resource to be non-compliant. The details include the
  1953. // name of the dependent service and the error message received that indicates
  1954. // the problem with the service.
  1955. IssueInfoMap map[string]*string `type:"map"`
  1956. // The AWS account ID.
  1957. MemberAccount *string `min:"1" type:"string"`
  1958. // The ID of the AWS Firewall Manager policy.
  1959. PolicyId *string `min:"36" type:"string"`
  1960. // The AWS account that created the AWS Firewall Manager policy.
  1961. PolicyOwner *string `min:"1" type:"string"`
  1962. // An array of resources that are not protected by the policy.
  1963. Violators []*ComplianceViolator `type:"list"`
  1964. }
  1965. // String returns the string representation
  1966. func (s PolicyComplianceDetail) String() string {
  1967. return awsutil.Prettify(s)
  1968. }
  1969. // GoString returns the string representation
  1970. func (s PolicyComplianceDetail) GoString() string {
  1971. return s.String()
  1972. }
  1973. // SetEvaluationLimitExceeded sets the EvaluationLimitExceeded field's value.
  1974. func (s *PolicyComplianceDetail) SetEvaluationLimitExceeded(v bool) *PolicyComplianceDetail {
  1975. s.EvaluationLimitExceeded = &v
  1976. return s
  1977. }
  1978. // SetExpiredAt sets the ExpiredAt field's value.
  1979. func (s *PolicyComplianceDetail) SetExpiredAt(v time.Time) *PolicyComplianceDetail {
  1980. s.ExpiredAt = &v
  1981. return s
  1982. }
  1983. // SetIssueInfoMap sets the IssueInfoMap field's value.
  1984. func (s *PolicyComplianceDetail) SetIssueInfoMap(v map[string]*string) *PolicyComplianceDetail {
  1985. s.IssueInfoMap = v
  1986. return s
  1987. }
  1988. // SetMemberAccount sets the MemberAccount field's value.
  1989. func (s *PolicyComplianceDetail) SetMemberAccount(v string) *PolicyComplianceDetail {
  1990. s.MemberAccount = &v
  1991. return s
  1992. }
  1993. // SetPolicyId sets the PolicyId field's value.
  1994. func (s *PolicyComplianceDetail) SetPolicyId(v string) *PolicyComplianceDetail {
  1995. s.PolicyId = &v
  1996. return s
  1997. }
  1998. // SetPolicyOwner sets the PolicyOwner field's value.
  1999. func (s *PolicyComplianceDetail) SetPolicyOwner(v string) *PolicyComplianceDetail {
  2000. s.PolicyOwner = &v
  2001. return s
  2002. }
  2003. // SetViolators sets the Violators field's value.
  2004. func (s *PolicyComplianceDetail) SetViolators(v []*ComplianceViolator) *PolicyComplianceDetail {
  2005. s.Violators = v
  2006. return s
  2007. }
  2008. // Indicates whether the account is compliant with the specified policy. An
  2009. // account is considered non-compliant if it includes resources that are not
  2010. // protected by the policy.
  2011. type PolicyComplianceStatus struct {
  2012. _ struct{} `type:"structure"`
  2013. // An array of EvaluationResult objects.
  2014. EvaluationResults []*EvaluationResult `type:"list"`
  2015. // Details about problems with dependent services, such as AWS WAF or AWS Config,
  2016. // that are causing a resource to be non-compliant. The details include the
  2017. // name of the dependent service and the error message received that indicates
  2018. // the problem with the service.
  2019. IssueInfoMap map[string]*string `type:"map"`
  2020. // Time stamp of the last update to the EvaluationResult objects.
  2021. LastUpdated *time.Time `type:"timestamp"`
  2022. // The member account ID.
  2023. MemberAccount *string `min:"1" type:"string"`
  2024. // The ID of the AWS Firewall Manager policy.
  2025. PolicyId *string `min:"36" type:"string"`
  2026. // The friendly name of the AWS Firewall Manager policy.
  2027. PolicyName *string `min:"1" type:"string"`
  2028. // The AWS account that created the AWS Firewall Manager policy.
  2029. PolicyOwner *string `min:"1" type:"string"`
  2030. }
  2031. // String returns the string representation
  2032. func (s PolicyComplianceStatus) String() string {
  2033. return awsutil.Prettify(s)
  2034. }
  2035. // GoString returns the string representation
  2036. func (s PolicyComplianceStatus) GoString() string {
  2037. return s.String()
  2038. }
  2039. // SetEvaluationResults sets the EvaluationResults field's value.
  2040. func (s *PolicyComplianceStatus) SetEvaluationResults(v []*EvaluationResult) *PolicyComplianceStatus {
  2041. s.EvaluationResults = v
  2042. return s
  2043. }
  2044. // SetIssueInfoMap sets the IssueInfoMap field's value.
  2045. func (s *PolicyComplianceStatus) SetIssueInfoMap(v map[string]*string) *PolicyComplianceStatus {
  2046. s.IssueInfoMap = v
  2047. return s
  2048. }
  2049. // SetLastUpdated sets the LastUpdated field's value.
  2050. func (s *PolicyComplianceStatus) SetLastUpdated(v time.Time) *PolicyComplianceStatus {
  2051. s.LastUpdated = &v
  2052. return s
  2053. }
  2054. // SetMemberAccount sets the MemberAccount field's value.
  2055. func (s *PolicyComplianceStatus) SetMemberAccount(v string) *PolicyComplianceStatus {
  2056. s.MemberAccount = &v
  2057. return s
  2058. }
  2059. // SetPolicyId sets the PolicyId field's value.
  2060. func (s *PolicyComplianceStatus) SetPolicyId(v string) *PolicyComplianceStatus {
  2061. s.PolicyId = &v
  2062. return s
  2063. }
  2064. // SetPolicyName sets the PolicyName field's value.
  2065. func (s *PolicyComplianceStatus) SetPolicyName(v string) *PolicyComplianceStatus {
  2066. s.PolicyName = &v
  2067. return s
  2068. }
  2069. // SetPolicyOwner sets the PolicyOwner field's value.
  2070. func (s *PolicyComplianceStatus) SetPolicyOwner(v string) *PolicyComplianceStatus {
  2071. s.PolicyOwner = &v
  2072. return s
  2073. }
  2074. // Details of the AWS Firewall Manager policy.
  2075. type PolicySummary struct {
  2076. _ struct{} `type:"structure"`
  2077. // The Amazon Resource Name (ARN) of the specified policy.
  2078. PolicyArn *string `min:"1" type:"string"`
  2079. // The ID of the specified policy.
  2080. PolicyId *string `min:"36" type:"string"`
  2081. // The friendly name of the specified policy.
  2082. PolicyName *string `min:"1" type:"string"`
  2083. // Indicates if the policy should be automatically applied to new resources.
  2084. RemediationEnabled *bool `type:"boolean"`
  2085. // The type of resource to protect with the policy, either an Application Load
  2086. // Balancer or a CloudFront distribution. This is in the format shown in AWS
  2087. // Resource Types Reference (https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html).
  2088. // Valid values are AWS::ElasticLoadBalancingV2::LoadBalancer or AWS::CloudFront::Distribution.
  2089. ResourceType *string `min:"1" type:"string"`
  2090. // The service that the policy is using to protect the resources. This value
  2091. // is WAF.
  2092. SecurityServiceType *string `type:"string" enum:"SecurityServiceType"`
  2093. }
  2094. // String returns the string representation
  2095. func (s PolicySummary) String() string {
  2096. return awsutil.Prettify(s)
  2097. }
  2098. // GoString returns the string representation
  2099. func (s PolicySummary) GoString() string {
  2100. return s.String()
  2101. }
  2102. // SetPolicyArn sets the PolicyArn field's value.
  2103. func (s *PolicySummary) SetPolicyArn(v string) *PolicySummary {
  2104. s.PolicyArn = &v
  2105. return s
  2106. }
  2107. // SetPolicyId sets the PolicyId field's value.
  2108. func (s *PolicySummary) SetPolicyId(v string) *PolicySummary {
  2109. s.PolicyId = &v
  2110. return s
  2111. }
  2112. // SetPolicyName sets the PolicyName field's value.
  2113. func (s *PolicySummary) SetPolicyName(v string) *PolicySummary {
  2114. s.PolicyName = &v
  2115. return s
  2116. }
  2117. // SetRemediationEnabled sets the RemediationEnabled field's value.
  2118. func (s *PolicySummary) SetRemediationEnabled(v bool) *PolicySummary {
  2119. s.RemediationEnabled = &v
  2120. return s
  2121. }
  2122. // SetResourceType sets the ResourceType field's value.
  2123. func (s *PolicySummary) SetResourceType(v string) *PolicySummary {
  2124. s.ResourceType = &v
  2125. return s
  2126. }
  2127. // SetSecurityServiceType sets the SecurityServiceType field's value.
  2128. func (s *PolicySummary) SetSecurityServiceType(v string) *PolicySummary {
  2129. s.SecurityServiceType = &v
  2130. return s
  2131. }
  2132. type PutNotificationChannelInput struct {
  2133. _ struct{} `type:"structure"`
  2134. // The Amazon Resource Name (ARN) of the IAM role that allows Amazon SNS to
  2135. // record AWS Firewall Manager activity.
  2136. //
  2137. // SnsRoleName is a required field
  2138. SnsRoleName *string `min:"1" type:"string" required:"true"`
  2139. // The Amazon Resource Name (ARN) of the SNS topic that collects notifications
  2140. // from AWS Firewall Manager.
  2141. //
  2142. // SnsTopicArn is a required field
  2143. SnsTopicArn *string `min:"1" type:"string" required:"true"`
  2144. }
  2145. // String returns the string representation
  2146. func (s PutNotificationChannelInput) String() string {
  2147. return awsutil.Prettify(s)
  2148. }
  2149. // GoString returns the string representation
  2150. func (s PutNotificationChannelInput) GoString() string {
  2151. return s.String()
  2152. }
  2153. // Validate inspects the fields of the type to determine if they are valid.
  2154. func (s *PutNotificationChannelInput) Validate() error {
  2155. invalidParams := request.ErrInvalidParams{Context: "PutNotificationChannelInput"}
  2156. if s.SnsRoleName == nil {
  2157. invalidParams.Add(request.NewErrParamRequired("SnsRoleName"))
  2158. }
  2159. if s.SnsRoleName != nil && len(*s.SnsRoleName) < 1 {
  2160. invalidParams.Add(request.NewErrParamMinLen("SnsRoleName", 1))
  2161. }
  2162. if s.SnsTopicArn == nil {
  2163. invalidParams.Add(request.NewErrParamRequired("SnsTopicArn"))
  2164. }
  2165. if s.SnsTopicArn != nil && len(*s.SnsTopicArn) < 1 {
  2166. invalidParams.Add(request.NewErrParamMinLen("SnsTopicArn", 1))
  2167. }
  2168. if invalidParams.Len() > 0 {
  2169. return invalidParams
  2170. }
  2171. return nil
  2172. }
  2173. // SetSnsRoleName sets the SnsRoleName field's value.
  2174. func (s *PutNotificationChannelInput) SetSnsRoleName(v string) *PutNotificationChannelInput {
  2175. s.SnsRoleName = &v
  2176. return s
  2177. }
  2178. // SetSnsTopicArn sets the SnsTopicArn field's value.
  2179. func (s *PutNotificationChannelInput) SetSnsTopicArn(v string) *PutNotificationChannelInput {
  2180. s.SnsTopicArn = &v
  2181. return s
  2182. }
  2183. type PutNotificationChannelOutput struct {
  2184. _ struct{} `type:"structure"`
  2185. }
  2186. // String returns the string representation
  2187. func (s PutNotificationChannelOutput) String() string {
  2188. return awsutil.Prettify(s)
  2189. }
  2190. // GoString returns the string representation
  2191. func (s PutNotificationChannelOutput) GoString() string {
  2192. return s.String()
  2193. }
  2194. type PutPolicyInput struct {
  2195. _ struct{} `type:"structure"`
  2196. // The details of the AWS Firewall Manager policy to be created.
  2197. //
  2198. // Policy is a required field
  2199. Policy *Policy `type:"structure" required:"true"`
  2200. }
  2201. // String returns the string representation
  2202. func (s PutPolicyInput) String() string {
  2203. return awsutil.Prettify(s)
  2204. }
  2205. // GoString returns the string representation
  2206. func (s PutPolicyInput) GoString() string {
  2207. return s.String()
  2208. }
  2209. // Validate inspects the fields of the type to determine if they are valid.
  2210. func (s *PutPolicyInput) Validate() error {
  2211. invalidParams := request.ErrInvalidParams{Context: "PutPolicyInput"}
  2212. if s.Policy == nil {
  2213. invalidParams.Add(request.NewErrParamRequired("Policy"))
  2214. }
  2215. if s.Policy != nil {
  2216. if err := s.Policy.Validate(); err != nil {
  2217. invalidParams.AddNested("Policy", err.(request.ErrInvalidParams))
  2218. }
  2219. }
  2220. if invalidParams.Len() > 0 {
  2221. return invalidParams
  2222. }
  2223. return nil
  2224. }
  2225. // SetPolicy sets the Policy field's value.
  2226. func (s *PutPolicyInput) SetPolicy(v *Policy) *PutPolicyInput {
  2227. s.Policy = v
  2228. return s
  2229. }
  2230. type PutPolicyOutput struct {
  2231. _ struct{} `type:"structure"`
  2232. // The details of the AWS Firewall Manager policy that was created.
  2233. Policy *Policy `type:"structure"`
  2234. // The Amazon Resource Name (ARN) of the policy that was created.
  2235. PolicyArn *string `min:"1" type:"string"`
  2236. }
  2237. // String returns the string representation
  2238. func (s PutPolicyOutput) String() string {
  2239. return awsutil.Prettify(s)
  2240. }
  2241. // GoString returns the string representation
  2242. func (s PutPolicyOutput) GoString() string {
  2243. return s.String()
  2244. }
  2245. // SetPolicy sets the Policy field's value.
  2246. func (s *PutPolicyOutput) SetPolicy(v *Policy) *PutPolicyOutput {
  2247. s.Policy = v
  2248. return s
  2249. }
  2250. // SetPolicyArn sets the PolicyArn field's value.
  2251. func (s *PutPolicyOutput) SetPolicyArn(v string) *PutPolicyOutput {
  2252. s.PolicyArn = &v
  2253. return s
  2254. }
  2255. // The resource tags that AWS Firewall Manager uses to determine if a particular
  2256. // resource should be included or excluded from protection by the AWS Firewall
  2257. // Manager policy. Tags enable you to categorize your AWS resources in different
  2258. // ways, for example, by purpose, owner, or environment. Each tag consists of
  2259. // a key and an optional value, both of which you define. Tags are combined
  2260. // with an "OR." That is, if you add more than one tag, if any of the tags matches,
  2261. // the resource is considered a match for the include or exclude. Working with
  2262. // Tag Editor (https://docs.aws.amazon.com/awsconsolehelpdocs/latest/gsg/tag-editor.html).
  2263. type ResourceTag struct {
  2264. _ struct{} `type:"structure"`
  2265. // The resource tag key.
  2266. //
  2267. // Key is a required field
  2268. Key *string `min:"1" type:"string" required:"true"`
  2269. // The resource tag value.
  2270. Value *string `type:"string"`
  2271. }
  2272. // String returns the string representation
  2273. func (s ResourceTag) String() string {
  2274. return awsutil.Prettify(s)
  2275. }
  2276. // GoString returns the string representation
  2277. func (s ResourceTag) GoString() string {
  2278. return s.String()
  2279. }
  2280. // Validate inspects the fields of the type to determine if they are valid.
  2281. func (s *ResourceTag) Validate() error {
  2282. invalidParams := request.ErrInvalidParams{Context: "ResourceTag"}
  2283. if s.Key == nil {
  2284. invalidParams.Add(request.NewErrParamRequired("Key"))
  2285. }
  2286. if s.Key != nil && len(*s.Key) < 1 {
  2287. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  2288. }
  2289. if invalidParams.Len() > 0 {
  2290. return invalidParams
  2291. }
  2292. return nil
  2293. }
  2294. // SetKey sets the Key field's value.
  2295. func (s *ResourceTag) SetKey(v string) *ResourceTag {
  2296. s.Key = &v
  2297. return s
  2298. }
  2299. // SetValue sets the Value field's value.
  2300. func (s *ResourceTag) SetValue(v string) *ResourceTag {
  2301. s.Value = &v
  2302. return s
  2303. }
  2304. // Details about the security service that is being used to protect the resources.
  2305. type SecurityServicePolicyData struct {
  2306. _ struct{} `type:"structure"`
  2307. // Details about the service. This contains WAF data in JSON format, as shown
  2308. // in the following example:
  2309. //
  2310. // ManagedServiceData": "{\"type\": \"WAF\", \"ruleGroups\": [{\"id\": \"12345678-1bcd-9012-efga-0987654321ab\",
  2311. // \"overrideAction\" : {\"type\": \"COUNT\"}}], \"defaultAction\": {\"type\":
  2312. // \"BLOCK\"}}
  2313. ManagedServiceData *string `min:"1" type:"string"`
  2314. // The service that the policy is using to protect the resources. This value
  2315. // is WAF.
  2316. //
  2317. // Type is a required field
  2318. Type *string `type:"string" required:"true" enum:"SecurityServiceType"`
  2319. }
  2320. // String returns the string representation
  2321. func (s SecurityServicePolicyData) String() string {
  2322. return awsutil.Prettify(s)
  2323. }
  2324. // GoString returns the string representation
  2325. func (s SecurityServicePolicyData) GoString() string {
  2326. return s.String()
  2327. }
  2328. // Validate inspects the fields of the type to determine if they are valid.
  2329. func (s *SecurityServicePolicyData) Validate() error {
  2330. invalidParams := request.ErrInvalidParams{Context: "SecurityServicePolicyData"}
  2331. if s.ManagedServiceData != nil && len(*s.ManagedServiceData) < 1 {
  2332. invalidParams.Add(request.NewErrParamMinLen("ManagedServiceData", 1))
  2333. }
  2334. if s.Type == nil {
  2335. invalidParams.Add(request.NewErrParamRequired("Type"))
  2336. }
  2337. if invalidParams.Len() > 0 {
  2338. return invalidParams
  2339. }
  2340. return nil
  2341. }
  2342. // SetManagedServiceData sets the ManagedServiceData field's value.
  2343. func (s *SecurityServicePolicyData) SetManagedServiceData(v string) *SecurityServicePolicyData {
  2344. s.ManagedServiceData = &v
  2345. return s
  2346. }
  2347. // SetType sets the Type field's value.
  2348. func (s *SecurityServicePolicyData) SetType(v string) *SecurityServicePolicyData {
  2349. s.Type = &v
  2350. return s
  2351. }
  2352. const (
  2353. // AccountRoleStatusReady is a AccountRoleStatus enum value
  2354. AccountRoleStatusReady = "READY"
  2355. // AccountRoleStatusCreating is a AccountRoleStatus enum value
  2356. AccountRoleStatusCreating = "CREATING"
  2357. // AccountRoleStatusPendingDeletion is a AccountRoleStatus enum value
  2358. AccountRoleStatusPendingDeletion = "PENDING_DELETION"
  2359. // AccountRoleStatusDeleting is a AccountRoleStatus enum value
  2360. AccountRoleStatusDeleting = "DELETING"
  2361. // AccountRoleStatusDeleted is a AccountRoleStatus enum value
  2362. AccountRoleStatusDeleted = "DELETED"
  2363. )
  2364. const (
  2365. // CustomerPolicyScopeIdTypeAccount is a CustomerPolicyScopeIdType enum value
  2366. CustomerPolicyScopeIdTypeAccount = "ACCOUNT"
  2367. )
  2368. const (
  2369. // DependentServiceNameAwsconfig is a DependentServiceName enum value
  2370. DependentServiceNameAwsconfig = "AWSCONFIG"
  2371. // DependentServiceNameAwswaf is a DependentServiceName enum value
  2372. DependentServiceNameAwswaf = "AWSWAF"
  2373. )
  2374. const (
  2375. // PolicyComplianceStatusTypeCompliant is a PolicyComplianceStatusType enum value
  2376. PolicyComplianceStatusTypeCompliant = "COMPLIANT"
  2377. // PolicyComplianceStatusTypeNonCompliant is a PolicyComplianceStatusType enum value
  2378. PolicyComplianceStatusTypeNonCompliant = "NON_COMPLIANT"
  2379. )
  2380. const (
  2381. // SecurityServiceTypeWaf is a SecurityServiceType enum value
  2382. SecurityServiceTypeWaf = "WAF"
  2383. )
  2384. const (
  2385. // ViolationReasonWebAclMissingRuleGroup is a ViolationReason enum value
  2386. ViolationReasonWebAclMissingRuleGroup = "WEB_ACL_MISSING_RULE_GROUP"
  2387. // ViolationReasonResourceMissingWebAcl is a ViolationReason enum value
  2388. ViolationReasonResourceMissingWebAcl = "RESOURCE_MISSING_WEB_ACL"
  2389. // ViolationReasonResourceIncorrectWebAcl is a ViolationReason enum value
  2390. ViolationReasonResourceIncorrectWebAcl = "RESOURCE_INCORRECT_WEB_ACL"
  2391. )