api.go 51 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471
  1. // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
  2. // Package acm provides a client for AWS Certificate Manager.
  3. package acm
  4. import (
  5. "fmt"
  6. "time"
  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 opAddTagsToCertificate = "AddTagsToCertificate"
  13. // AddTagsToCertificateRequest generates a "aws/request.Request" representing the
  14. // client's request for the AddTagsToCertificate operation. The "output" return
  15. // value can be used to capture response data after the request's "Send" method
  16. // is called.
  17. //
  18. // Creating a request object using this method should be used when you want to inject
  19. // custom logic into the request's lifecycle using a custom handler, or if you want to
  20. // access properties on the request object before or after sending the request. If
  21. // you just want the service response, call the AddTagsToCertificate method directly
  22. // instead.
  23. //
  24. // Note: You must call the "Send" method on the returned request object in order
  25. // to execute the request.
  26. //
  27. // // Example sending a request using the AddTagsToCertificateRequest method.
  28. // req, resp := client.AddTagsToCertificateRequest(params)
  29. //
  30. // err := req.Send()
  31. // if err == nil { // resp is now filled
  32. // fmt.Println(resp)
  33. // }
  34. //
  35. func (c *ACM) AddTagsToCertificateRequest(input *AddTagsToCertificateInput) (req *request.Request, output *AddTagsToCertificateOutput) {
  36. op := &request.Operation{
  37. Name: opAddTagsToCertificate,
  38. HTTPMethod: "POST",
  39. HTTPPath: "/",
  40. }
  41. if input == nil {
  42. input = &AddTagsToCertificateInput{}
  43. }
  44. req = c.newRequest(op, input, output)
  45. req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
  46. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  47. output = &AddTagsToCertificateOutput{}
  48. req.Data = output
  49. return
  50. }
  51. // Adds one or more tags to an ACM Certificate. Tags are labels that you can
  52. // use to identify and organize your AWS resources. Each tag consists of a key
  53. // and an optional value. You specify the certificate on input by its Amazon
  54. // Resource Name (ARN). You specify the tag by using a key-value pair.
  55. //
  56. // You can apply a tag to just one certificate if you want to identify a specific
  57. // characteristic of that certificate, or you can apply the same tag to multiple
  58. // certificates if you want to filter for a common relationship among those
  59. // certificates. Similarly, you can apply the same tag to multiple resources
  60. // if you want to specify a relationship among those resources. For example,
  61. // you can add the same tag to an ACM Certificate and an Elastic Load Balancing
  62. // load balancer to indicate that they are both used by the same website. For
  63. // more information, see Tagging ACM Certificates (http://docs.aws.amazon.com/acm/latest/userguide/tags.html).
  64. //
  65. // To remove one or more tags, use the RemoveTagsFromCertificate action. To
  66. // view all of the tags that have been applied to the certificate, use the ListTagsForCertificate
  67. // action.
  68. func (c *ACM) AddTagsToCertificate(input *AddTagsToCertificateInput) (*AddTagsToCertificateOutput, error) {
  69. req, out := c.AddTagsToCertificateRequest(input)
  70. err := req.Send()
  71. return out, err
  72. }
  73. const opDeleteCertificate = "DeleteCertificate"
  74. // DeleteCertificateRequest generates a "aws/request.Request" representing the
  75. // client's request for the DeleteCertificate operation. The "output" return
  76. // value can be used to capture response data after the request's "Send" method
  77. // is called.
  78. //
  79. // Creating a request object using this method should be used when you want to inject
  80. // custom logic into the request's lifecycle using a custom handler, or if you want to
  81. // access properties on the request object before or after sending the request. If
  82. // you just want the service response, call the DeleteCertificate method directly
  83. // instead.
  84. //
  85. // Note: You must call the "Send" method on the returned request object in order
  86. // to execute the request.
  87. //
  88. // // Example sending a request using the DeleteCertificateRequest method.
  89. // req, resp := client.DeleteCertificateRequest(params)
  90. //
  91. // err := req.Send()
  92. // if err == nil { // resp is now filled
  93. // fmt.Println(resp)
  94. // }
  95. //
  96. func (c *ACM) DeleteCertificateRequest(input *DeleteCertificateInput) (req *request.Request, output *DeleteCertificateOutput) {
  97. op := &request.Operation{
  98. Name: opDeleteCertificate,
  99. HTTPMethod: "POST",
  100. HTTPPath: "/",
  101. }
  102. if input == nil {
  103. input = &DeleteCertificateInput{}
  104. }
  105. req = c.newRequest(op, input, output)
  106. req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
  107. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  108. output = &DeleteCertificateOutput{}
  109. req.Data = output
  110. return
  111. }
  112. // Deletes an ACM Certificate and its associated private key. If this action
  113. // succeeds, the certificate no longer appears in the list of ACM Certificates
  114. // that can be displayed by calling the ListCertificates action or be retrieved
  115. // by calling the GetCertificate action. The certificate will not be available
  116. // for use by other AWS services.
  117. //
  118. // You cannot delete an ACM Certificate that is being used by another AWS
  119. // service. To delete a certificate that is in use, the certificate association
  120. // must first be removed.
  121. func (c *ACM) DeleteCertificate(input *DeleteCertificateInput) (*DeleteCertificateOutput, error) {
  122. req, out := c.DeleteCertificateRequest(input)
  123. err := req.Send()
  124. return out, err
  125. }
  126. const opDescribeCertificate = "DescribeCertificate"
  127. // DescribeCertificateRequest generates a "aws/request.Request" representing the
  128. // client's request for the DescribeCertificate operation. The "output" return
  129. // value can be used to capture response data after the request's "Send" method
  130. // is called.
  131. //
  132. // Creating a request object using this method should be used when you want to inject
  133. // custom logic into the request's lifecycle using a custom handler, or if you want to
  134. // access properties on the request object before or after sending the request. If
  135. // you just want the service response, call the DescribeCertificate method directly
  136. // instead.
  137. //
  138. // Note: You must call the "Send" method on the returned request object in order
  139. // to execute the request.
  140. //
  141. // // Example sending a request using the DescribeCertificateRequest method.
  142. // req, resp := client.DescribeCertificateRequest(params)
  143. //
  144. // err := req.Send()
  145. // if err == nil { // resp is now filled
  146. // fmt.Println(resp)
  147. // }
  148. //
  149. func (c *ACM) DescribeCertificateRequest(input *DescribeCertificateInput) (req *request.Request, output *DescribeCertificateOutput) {
  150. op := &request.Operation{
  151. Name: opDescribeCertificate,
  152. HTTPMethod: "POST",
  153. HTTPPath: "/",
  154. }
  155. if input == nil {
  156. input = &DescribeCertificateInput{}
  157. }
  158. req = c.newRequest(op, input, output)
  159. output = &DescribeCertificateOutput{}
  160. req.Data = output
  161. return
  162. }
  163. // Returns a list of the fields contained in the specified ACM Certificate.
  164. // For example, this action returns the certificate status, a flag that indicates
  165. // whether the certificate is associated with any other AWS service, and the
  166. // date at which the certificate request was created. You specify the ACM Certificate
  167. // on input by its Amazon Resource Name (ARN).
  168. func (c *ACM) DescribeCertificate(input *DescribeCertificateInput) (*DescribeCertificateOutput, error) {
  169. req, out := c.DescribeCertificateRequest(input)
  170. err := req.Send()
  171. return out, err
  172. }
  173. const opGetCertificate = "GetCertificate"
  174. // GetCertificateRequest generates a "aws/request.Request" representing the
  175. // client's request for the GetCertificate operation. The "output" return
  176. // value can be used to capture response data after the request's "Send" method
  177. // is called.
  178. //
  179. // Creating a request object using this method should be used when you want to inject
  180. // custom logic into the request's lifecycle using a custom handler, or if you want to
  181. // access properties on the request object before or after sending the request. If
  182. // you just want the service response, call the GetCertificate method directly
  183. // instead.
  184. //
  185. // Note: You must call the "Send" method on the returned request object in order
  186. // to execute the request.
  187. //
  188. // // Example sending a request using the GetCertificateRequest method.
  189. // req, resp := client.GetCertificateRequest(params)
  190. //
  191. // err := req.Send()
  192. // if err == nil { // resp is now filled
  193. // fmt.Println(resp)
  194. // }
  195. //
  196. func (c *ACM) GetCertificateRequest(input *GetCertificateInput) (req *request.Request, output *GetCertificateOutput) {
  197. op := &request.Operation{
  198. Name: opGetCertificate,
  199. HTTPMethod: "POST",
  200. HTTPPath: "/",
  201. }
  202. if input == nil {
  203. input = &GetCertificateInput{}
  204. }
  205. req = c.newRequest(op, input, output)
  206. output = &GetCertificateOutput{}
  207. req.Data = output
  208. return
  209. }
  210. // Retrieves an ACM Certificate and certificate chain for the certificate specified
  211. // by an ARN. The chain is an ordered list of certificates that contains the
  212. // root certificate, intermediate certificates of subordinate CAs, and the ACM
  213. // Certificate. The certificate and certificate chain are base64 encoded. If
  214. // you want to decode the certificate chain to see the individual certificate
  215. // fields, you can use OpenSSL.
  216. //
  217. // Currently, ACM Certificates can be used only with Elastic Load Balancing
  218. // and Amazon CloudFront.
  219. func (c *ACM) GetCertificate(input *GetCertificateInput) (*GetCertificateOutput, error) {
  220. req, out := c.GetCertificateRequest(input)
  221. err := req.Send()
  222. return out, err
  223. }
  224. const opListCertificates = "ListCertificates"
  225. // ListCertificatesRequest generates a "aws/request.Request" representing the
  226. // client's request for the ListCertificates operation. The "output" return
  227. // value can be used to capture response data after the request's "Send" method
  228. // is called.
  229. //
  230. // Creating a request object using this method should be used when you want to inject
  231. // custom logic into the request's lifecycle using a custom handler, or if you want to
  232. // access properties on the request object before or after sending the request. If
  233. // you just want the service response, call the ListCertificates method directly
  234. // instead.
  235. //
  236. // Note: You must call the "Send" method on the returned request object in order
  237. // to execute the request.
  238. //
  239. // // Example sending a request using the ListCertificatesRequest method.
  240. // req, resp := client.ListCertificatesRequest(params)
  241. //
  242. // err := req.Send()
  243. // if err == nil { // resp is now filled
  244. // fmt.Println(resp)
  245. // }
  246. //
  247. func (c *ACM) ListCertificatesRequest(input *ListCertificatesInput) (req *request.Request, output *ListCertificatesOutput) {
  248. op := &request.Operation{
  249. Name: opListCertificates,
  250. HTTPMethod: "POST",
  251. HTTPPath: "/",
  252. Paginator: &request.Paginator{
  253. InputTokens: []string{"NextToken"},
  254. OutputTokens: []string{"NextToken"},
  255. LimitToken: "MaxItems",
  256. TruncationToken: "",
  257. },
  258. }
  259. if input == nil {
  260. input = &ListCertificatesInput{}
  261. }
  262. req = c.newRequest(op, input, output)
  263. output = &ListCertificatesOutput{}
  264. req.Data = output
  265. return
  266. }
  267. // Retrieves a list of ACM Certificates and the domain name for each. You can
  268. // optionally filter the list to return only the certificates that match the
  269. // specified status.
  270. func (c *ACM) ListCertificates(input *ListCertificatesInput) (*ListCertificatesOutput, error) {
  271. req, out := c.ListCertificatesRequest(input)
  272. err := req.Send()
  273. return out, err
  274. }
  275. // ListCertificatesPages iterates over the pages of a ListCertificates operation,
  276. // calling the "fn" function with the response data for each page. To stop
  277. // iterating, return false from the fn function.
  278. //
  279. // See ListCertificates method for more information on how to use this operation.
  280. //
  281. // Note: This operation can generate multiple requests to a service.
  282. //
  283. // // Example iterating over at most 3 pages of a ListCertificates operation.
  284. // pageNum := 0
  285. // err := client.ListCertificatesPages(params,
  286. // func(page *ListCertificatesOutput, lastPage bool) bool {
  287. // pageNum++
  288. // fmt.Println(page)
  289. // return pageNum <= 3
  290. // })
  291. //
  292. func (c *ACM) ListCertificatesPages(input *ListCertificatesInput, fn func(p *ListCertificatesOutput, lastPage bool) (shouldContinue bool)) error {
  293. page, _ := c.ListCertificatesRequest(input)
  294. page.Handlers.Build.PushBack(request.MakeAddToUserAgentFreeFormHandler("Paginator"))
  295. return page.EachPage(func(p interface{}, lastPage bool) bool {
  296. return fn(p.(*ListCertificatesOutput), lastPage)
  297. })
  298. }
  299. const opListTagsForCertificate = "ListTagsForCertificate"
  300. // ListTagsForCertificateRequest generates a "aws/request.Request" representing the
  301. // client's request for the ListTagsForCertificate operation. The "output" return
  302. // value can be used to capture response data after the request's "Send" method
  303. // is called.
  304. //
  305. // Creating a request object using this method should be used when you want to inject
  306. // custom logic into the request's lifecycle using a custom handler, or if you want to
  307. // access properties on the request object before or after sending the request. If
  308. // you just want the service response, call the ListTagsForCertificate method directly
  309. // instead.
  310. //
  311. // Note: You must call the "Send" method on the returned request object in order
  312. // to execute the request.
  313. //
  314. // // Example sending a request using the ListTagsForCertificateRequest method.
  315. // req, resp := client.ListTagsForCertificateRequest(params)
  316. //
  317. // err := req.Send()
  318. // if err == nil { // resp is now filled
  319. // fmt.Println(resp)
  320. // }
  321. //
  322. func (c *ACM) ListTagsForCertificateRequest(input *ListTagsForCertificateInput) (req *request.Request, output *ListTagsForCertificateOutput) {
  323. op := &request.Operation{
  324. Name: opListTagsForCertificate,
  325. HTTPMethod: "POST",
  326. HTTPPath: "/",
  327. }
  328. if input == nil {
  329. input = &ListTagsForCertificateInput{}
  330. }
  331. req = c.newRequest(op, input, output)
  332. output = &ListTagsForCertificateOutput{}
  333. req.Data = output
  334. return
  335. }
  336. // Lists the tags that have been applied to the ACM Certificate. Use the certificate
  337. // ARN to specify the certificate. To add a tag to an ACM Certificate, use the
  338. // AddTagsToCertificate action. To delete a tag, use the RemoveTagsFromCertificate
  339. // action.
  340. func (c *ACM) ListTagsForCertificate(input *ListTagsForCertificateInput) (*ListTagsForCertificateOutput, error) {
  341. req, out := c.ListTagsForCertificateRequest(input)
  342. err := req.Send()
  343. return out, err
  344. }
  345. const opRemoveTagsFromCertificate = "RemoveTagsFromCertificate"
  346. // RemoveTagsFromCertificateRequest generates a "aws/request.Request" representing the
  347. // client's request for the RemoveTagsFromCertificate operation. The "output" return
  348. // value can be used to capture response data after the request's "Send" method
  349. // is called.
  350. //
  351. // Creating a request object using this method should be used when you want to inject
  352. // custom logic into the request's lifecycle using a custom handler, or if you want to
  353. // access properties on the request object before or after sending the request. If
  354. // you just want the service response, call the RemoveTagsFromCertificate method directly
  355. // instead.
  356. //
  357. // Note: You must call the "Send" method on the returned request object in order
  358. // to execute the request.
  359. //
  360. // // Example sending a request using the RemoveTagsFromCertificateRequest method.
  361. // req, resp := client.RemoveTagsFromCertificateRequest(params)
  362. //
  363. // err := req.Send()
  364. // if err == nil { // resp is now filled
  365. // fmt.Println(resp)
  366. // }
  367. //
  368. func (c *ACM) RemoveTagsFromCertificateRequest(input *RemoveTagsFromCertificateInput) (req *request.Request, output *RemoveTagsFromCertificateOutput) {
  369. op := &request.Operation{
  370. Name: opRemoveTagsFromCertificate,
  371. HTTPMethod: "POST",
  372. HTTPPath: "/",
  373. }
  374. if input == nil {
  375. input = &RemoveTagsFromCertificateInput{}
  376. }
  377. req = c.newRequest(op, input, output)
  378. req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
  379. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  380. output = &RemoveTagsFromCertificateOutput{}
  381. req.Data = output
  382. return
  383. }
  384. // Remove one or more tags from an ACM Certificate. A tag consists of a key-value
  385. // pair. If you do not specify the value portion of the tag when calling this
  386. // function, the tag will be removed regardless of value. If you specify a value,
  387. // the tag is removed only if it is associated with the specified value.
  388. //
  389. // To add tags to a certificate, use the AddTagsToCertificate action. To view
  390. // all of the tags that have been applied to a specific ACM Certificate, use
  391. // the ListTagsForCertificate action.
  392. func (c *ACM) RemoveTagsFromCertificate(input *RemoveTagsFromCertificateInput) (*RemoveTagsFromCertificateOutput, error) {
  393. req, out := c.RemoveTagsFromCertificateRequest(input)
  394. err := req.Send()
  395. return out, err
  396. }
  397. const opRequestCertificate = "RequestCertificate"
  398. // RequestCertificateRequest generates a "aws/request.Request" representing the
  399. // client's request for the RequestCertificate operation. The "output" return
  400. // value can be used to capture response data after the request's "Send" method
  401. // is called.
  402. //
  403. // Creating a request object using this method should be used when you want to inject
  404. // custom logic into the request's lifecycle using a custom handler, or if you want to
  405. // access properties on the request object before or after sending the request. If
  406. // you just want the service response, call the RequestCertificate method directly
  407. // instead.
  408. //
  409. // Note: You must call the "Send" method on the returned request object in order
  410. // to execute the request.
  411. //
  412. // // Example sending a request using the RequestCertificateRequest method.
  413. // req, resp := client.RequestCertificateRequest(params)
  414. //
  415. // err := req.Send()
  416. // if err == nil { // resp is now filled
  417. // fmt.Println(resp)
  418. // }
  419. //
  420. func (c *ACM) RequestCertificateRequest(input *RequestCertificateInput) (req *request.Request, output *RequestCertificateOutput) {
  421. op := &request.Operation{
  422. Name: opRequestCertificate,
  423. HTTPMethod: "POST",
  424. HTTPPath: "/",
  425. }
  426. if input == nil {
  427. input = &RequestCertificateInput{}
  428. }
  429. req = c.newRequest(op, input, output)
  430. output = &RequestCertificateOutput{}
  431. req.Data = output
  432. return
  433. }
  434. // Requests an ACM Certificate for use with other AWS services. To request an
  435. // ACM Certificate, you must specify the fully qualified domain name (FQDN)
  436. // for your site. You can also specify additional FQDNs if users can reach your
  437. // site by using other names. For each domain name you specify, email is sent
  438. // to the domain owner to request approval to issue the certificate. After receiving
  439. // approval from the domain owner, the ACM Certificate is issued. For more information,
  440. // see the AWS Certificate Manager User Guide (http://docs.aws.amazon.com/acm/latest/userguide/overview.html).
  441. func (c *ACM) RequestCertificate(input *RequestCertificateInput) (*RequestCertificateOutput, error) {
  442. req, out := c.RequestCertificateRequest(input)
  443. err := req.Send()
  444. return out, err
  445. }
  446. const opResendValidationEmail = "ResendValidationEmail"
  447. // ResendValidationEmailRequest generates a "aws/request.Request" representing the
  448. // client's request for the ResendValidationEmail operation. The "output" return
  449. // value can be used to capture response data after the request's "Send" method
  450. // is called.
  451. //
  452. // Creating a request object using this method should be used when you want to inject
  453. // custom logic into the request's lifecycle using a custom handler, or if you want to
  454. // access properties on the request object before or after sending the request. If
  455. // you just want the service response, call the ResendValidationEmail method directly
  456. // instead.
  457. //
  458. // Note: You must call the "Send" method on the returned request object in order
  459. // to execute the request.
  460. //
  461. // // Example sending a request using the ResendValidationEmailRequest method.
  462. // req, resp := client.ResendValidationEmailRequest(params)
  463. //
  464. // err := req.Send()
  465. // if err == nil { // resp is now filled
  466. // fmt.Println(resp)
  467. // }
  468. //
  469. func (c *ACM) ResendValidationEmailRequest(input *ResendValidationEmailInput) (req *request.Request, output *ResendValidationEmailOutput) {
  470. op := &request.Operation{
  471. Name: opResendValidationEmail,
  472. HTTPMethod: "POST",
  473. HTTPPath: "/",
  474. }
  475. if input == nil {
  476. input = &ResendValidationEmailInput{}
  477. }
  478. req = c.newRequest(op, input, output)
  479. req.Handlers.Unmarshal.Remove(jsonrpc.UnmarshalHandler)
  480. req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
  481. output = &ResendValidationEmailOutput{}
  482. req.Data = output
  483. return
  484. }
  485. // Resends the email that requests domain ownership validation. The domain owner
  486. // or an authorized representative must approve the ACM Certificate before it
  487. // can be issued. The certificate can be approved by clicking a link in the
  488. // mail to navigate to the Amazon certificate approval website and then clicking
  489. // I Approve. However, the validation email can be blocked by spam filters.
  490. // Therefore, if you do not receive the original mail, you can request that
  491. // the mail be resent within 72 hours of requesting the ACM Certificate. If
  492. // more than 72 hours have elapsed since your original request or since your
  493. // last attempt to resend validation mail, you must request a new certificate.
  494. func (c *ACM) ResendValidationEmail(input *ResendValidationEmailInput) (*ResendValidationEmailOutput, error) {
  495. req, out := c.ResendValidationEmailRequest(input)
  496. err := req.Send()
  497. return out, err
  498. }
  499. type AddTagsToCertificateInput struct {
  500. _ struct{} `type:"structure"`
  501. // String that contains the ARN of the ACM Certificate to which the tag is to
  502. // be applied. This must be of the form:
  503. //
  504. // arn:aws:acm:region:123456789012:certificate/12345678-1234-1234-1234-123456789012
  505. //
  506. // For more information about ARNs, see Amazon Resource Names (ARNs) and AWS
  507. // Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html).
  508. CertificateArn *string `min:"20" type:"string" required:"true"`
  509. // The key-value pair that defines the tag. The tag value is optional.
  510. Tags []*Tag `min:"1" type:"list" required:"true"`
  511. }
  512. // String returns the string representation
  513. func (s AddTagsToCertificateInput) String() string {
  514. return awsutil.Prettify(s)
  515. }
  516. // GoString returns the string representation
  517. func (s AddTagsToCertificateInput) GoString() string {
  518. return s.String()
  519. }
  520. // Validate inspects the fields of the type to determine if they are valid.
  521. func (s *AddTagsToCertificateInput) Validate() error {
  522. invalidParams := request.ErrInvalidParams{Context: "AddTagsToCertificateInput"}
  523. if s.CertificateArn == nil {
  524. invalidParams.Add(request.NewErrParamRequired("CertificateArn"))
  525. }
  526. if s.CertificateArn != nil && len(*s.CertificateArn) < 20 {
  527. invalidParams.Add(request.NewErrParamMinLen("CertificateArn", 20))
  528. }
  529. if s.Tags == nil {
  530. invalidParams.Add(request.NewErrParamRequired("Tags"))
  531. }
  532. if s.Tags != nil && len(s.Tags) < 1 {
  533. invalidParams.Add(request.NewErrParamMinLen("Tags", 1))
  534. }
  535. if s.Tags != nil {
  536. for i, v := range s.Tags {
  537. if v == nil {
  538. continue
  539. }
  540. if err := v.Validate(); err != nil {
  541. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  542. }
  543. }
  544. }
  545. if invalidParams.Len() > 0 {
  546. return invalidParams
  547. }
  548. return nil
  549. }
  550. type AddTagsToCertificateOutput struct {
  551. _ struct{} `type:"structure"`
  552. }
  553. // String returns the string representation
  554. func (s AddTagsToCertificateOutput) String() string {
  555. return awsutil.Prettify(s)
  556. }
  557. // GoString returns the string representation
  558. func (s AddTagsToCertificateOutput) GoString() string {
  559. return s.String()
  560. }
  561. // Contains detailed metadata about an ACM Certificate. This structure is returned
  562. // in the response to a DescribeCertificate request.
  563. type CertificateDetail struct {
  564. _ struct{} `type:"structure"`
  565. // The Amazon Resource Name (ARN) of the certificate. For more information about
  566. // ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html).
  567. CertificateArn *string `min:"20" type:"string"`
  568. // The time at which the certificate was requested.
  569. CreatedAt *time.Time `type:"timestamp" timestampFormat:"unix"`
  570. // The fully qualified domain name (FQDN) for the certificate, such as www.example.com
  571. // or example.com.
  572. DomainName *string `min:"1" type:"string"`
  573. // Contains information about the email address or addresses used for domain
  574. // validation.
  575. DomainValidationOptions []*DomainValidation `min:"1" type:"list"`
  576. // The reason the certificate request failed. This value exists only when the
  577. // structure's Status is FAILED. For more information, see Certificate Request
  578. // Failed (http://docs.aws.amazon.com/acm/latest/userguide/troubleshooting.html#troubleshooting-failed)
  579. // in the AWS Certificate Manager User Guide.
  580. FailureReason *string `type:"string" enum:"FailureReason"`
  581. // A list of ARNs for the resources that are using the certificate. An ACM Certificate
  582. // can be used by multiple AWS resources.
  583. InUseBy []*string `type:"list"`
  584. // The time at which the certificate was issued.
  585. IssuedAt *time.Time `type:"timestamp" timestampFormat:"unix"`
  586. // The X.500 distinguished name of the CA that issued and signed the certificate.
  587. Issuer *string `type:"string"`
  588. // The algorithm used to generate the key pair (the public and private key).
  589. // Currently the only supported value is RSA_2048.
  590. KeyAlgorithm *string `type:"string" enum:"KeyAlgorithm"`
  591. // The time after which the certificate is not valid.
  592. NotAfter *time.Time `type:"timestamp" timestampFormat:"unix"`
  593. // The time before which the certificate is not valid.
  594. NotBefore *time.Time `type:"timestamp" timestampFormat:"unix"`
  595. // The reason the certificate was revoked. This value exists only when the certificate
  596. // status is REVOKED.
  597. RevocationReason *string `type:"string" enum:"RevocationReason"`
  598. // The time at which the certificate was revoked. This value exists only when
  599. // the certificate status is REVOKED.
  600. RevokedAt *time.Time `type:"timestamp" timestampFormat:"unix"`
  601. // The serial number of the certificate.
  602. Serial *string `type:"string"`
  603. // The algorithm used to generate a signature. Currently the only supported
  604. // value is SHA256WITHRSA.
  605. SignatureAlgorithm *string `type:"string"`
  606. // The status of the certificate.
  607. Status *string `type:"string" enum:"CertificateStatus"`
  608. // The X.500 distinguished name of the entity associated with the public key
  609. // contained in the certificate.
  610. Subject *string `type:"string"`
  611. // One or more domain names (subject alternative names) included in the certificate
  612. // request. After the certificate is issued, this list includes the domain names
  613. // bound to the public key contained in the certificate. The subject alternative
  614. // names include the canonical domain name (CN) of the certificate and additional
  615. // domain names that can be used to connect to the website.
  616. SubjectAlternativeNames []*string `min:"1" type:"list"`
  617. }
  618. // String returns the string representation
  619. func (s CertificateDetail) String() string {
  620. return awsutil.Prettify(s)
  621. }
  622. // GoString returns the string representation
  623. func (s CertificateDetail) GoString() string {
  624. return s.String()
  625. }
  626. // This structure is returned in the response object of ListCertificates action.
  627. type CertificateSummary struct {
  628. _ struct{} `type:"structure"`
  629. // Amazon Resource Name (ARN) of the certificate. This is of the form:
  630. //
  631. // arn:aws:acm:region:123456789012:certificate/12345678-1234-1234-1234-123456789012
  632. //
  633. // For more information about ARNs, see Amazon Resource Names (ARNs) and AWS
  634. // Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html).
  635. CertificateArn *string `min:"20" type:"string"`
  636. // Fully qualified domain name (FQDN), such as www.example.com or example.com,
  637. // for the certificate.
  638. DomainName *string `min:"1" type:"string"`
  639. }
  640. // String returns the string representation
  641. func (s CertificateSummary) String() string {
  642. return awsutil.Prettify(s)
  643. }
  644. // GoString returns the string representation
  645. func (s CertificateSummary) GoString() string {
  646. return s.String()
  647. }
  648. type DeleteCertificateInput struct {
  649. _ struct{} `type:"structure"`
  650. // String that contains the ARN of the ACM Certificate to be deleted. This must
  651. // be of the form:
  652. //
  653. // arn:aws:acm:region:123456789012:certificate/12345678-1234-1234-1234-123456789012
  654. //
  655. // For more information about ARNs, see Amazon Resource Names (ARNs) and AWS
  656. // Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html).
  657. CertificateArn *string `min:"20" type:"string" required:"true"`
  658. }
  659. // String returns the string representation
  660. func (s DeleteCertificateInput) String() string {
  661. return awsutil.Prettify(s)
  662. }
  663. // GoString returns the string representation
  664. func (s DeleteCertificateInput) GoString() string {
  665. return s.String()
  666. }
  667. // Validate inspects the fields of the type to determine if they are valid.
  668. func (s *DeleteCertificateInput) Validate() error {
  669. invalidParams := request.ErrInvalidParams{Context: "DeleteCertificateInput"}
  670. if s.CertificateArn == nil {
  671. invalidParams.Add(request.NewErrParamRequired("CertificateArn"))
  672. }
  673. if s.CertificateArn != nil && len(*s.CertificateArn) < 20 {
  674. invalidParams.Add(request.NewErrParamMinLen("CertificateArn", 20))
  675. }
  676. if invalidParams.Len() > 0 {
  677. return invalidParams
  678. }
  679. return nil
  680. }
  681. type DeleteCertificateOutput struct {
  682. _ struct{} `type:"structure"`
  683. }
  684. // String returns the string representation
  685. func (s DeleteCertificateOutput) String() string {
  686. return awsutil.Prettify(s)
  687. }
  688. // GoString returns the string representation
  689. func (s DeleteCertificateOutput) GoString() string {
  690. return s.String()
  691. }
  692. type DescribeCertificateInput struct {
  693. _ struct{} `type:"structure"`
  694. // String that contains an ACM Certificate ARN. The ARN must be of the form:
  695. //
  696. // arn:aws:acm:region:123456789012:certificate/12345678-1234-1234-1234-123456789012
  697. //
  698. // For more information about ARNs, see Amazon Resource Names (ARNs) and AWS
  699. // Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html).
  700. CertificateArn *string `min:"20" type:"string" required:"true"`
  701. }
  702. // String returns the string representation
  703. func (s DescribeCertificateInput) String() string {
  704. return awsutil.Prettify(s)
  705. }
  706. // GoString returns the string representation
  707. func (s DescribeCertificateInput) GoString() string {
  708. return s.String()
  709. }
  710. // Validate inspects the fields of the type to determine if they are valid.
  711. func (s *DescribeCertificateInput) Validate() error {
  712. invalidParams := request.ErrInvalidParams{Context: "DescribeCertificateInput"}
  713. if s.CertificateArn == nil {
  714. invalidParams.Add(request.NewErrParamRequired("CertificateArn"))
  715. }
  716. if s.CertificateArn != nil && len(*s.CertificateArn) < 20 {
  717. invalidParams.Add(request.NewErrParamMinLen("CertificateArn", 20))
  718. }
  719. if invalidParams.Len() > 0 {
  720. return invalidParams
  721. }
  722. return nil
  723. }
  724. type DescribeCertificateOutput struct {
  725. _ struct{} `type:"structure"`
  726. // Contains a CertificateDetail structure that lists the fields of an ACM Certificate.
  727. Certificate *CertificateDetail `type:"structure"`
  728. }
  729. // String returns the string representation
  730. func (s DescribeCertificateOutput) String() string {
  731. return awsutil.Prettify(s)
  732. }
  733. // GoString returns the string representation
  734. func (s DescribeCertificateOutput) GoString() string {
  735. return s.String()
  736. }
  737. // Structure that contains the domain name, the base validation domain to which
  738. // validation email is sent, and the email addresses used to validate the domain
  739. // identity.
  740. type DomainValidation struct {
  741. _ struct{} `type:"structure"`
  742. // Fully Qualified Domain Name (FQDN) of the form www.example.com or example.com.
  743. DomainName *string `min:"1" type:"string" required:"true"`
  744. // The base validation domain that acts as the suffix of the email addresses
  745. // that are used to send the emails.
  746. ValidationDomain *string `min:"1" type:"string"`
  747. // A list of contact address for the domain registrant.
  748. ValidationEmails []*string `type:"list"`
  749. }
  750. // String returns the string representation
  751. func (s DomainValidation) String() string {
  752. return awsutil.Prettify(s)
  753. }
  754. // GoString returns the string representation
  755. func (s DomainValidation) GoString() string {
  756. return s.String()
  757. }
  758. // This structure is used in the request object of the RequestCertificate action.
  759. type DomainValidationOption struct {
  760. _ struct{} `type:"structure"`
  761. // Fully Qualified Domain Name (FQDN) of the certificate being requested.
  762. DomainName *string `min:"1" type:"string" required:"true"`
  763. // The domain to which validation email is sent. This is the base validation
  764. // domain that will act as the suffix of the email addresses. This must be the
  765. // same as the DomainName value or a superdomain of the DomainName value. For
  766. // example, if you requested a certificate for site.subdomain.example.com and
  767. // specify a ValidationDomain of subdomain.example.com, ACM sends email to the
  768. // domain registrant, technical contact, and administrative contact in WHOIS
  769. // for the base domain and the following five addresses:
  770. //
  771. // admin@subdomain.example.com
  772. //
  773. // administrator@subdomain.example.com
  774. //
  775. // hostmaster@subdomain.example.com
  776. //
  777. // postmaster@subdomain.example.com
  778. //
  779. // webmaster@subdomain.example.com
  780. ValidationDomain *string `min:"1" type:"string" required:"true"`
  781. }
  782. // String returns the string representation
  783. func (s DomainValidationOption) String() string {
  784. return awsutil.Prettify(s)
  785. }
  786. // GoString returns the string representation
  787. func (s DomainValidationOption) GoString() string {
  788. return s.String()
  789. }
  790. // Validate inspects the fields of the type to determine if they are valid.
  791. func (s *DomainValidationOption) Validate() error {
  792. invalidParams := request.ErrInvalidParams{Context: "DomainValidationOption"}
  793. if s.DomainName == nil {
  794. invalidParams.Add(request.NewErrParamRequired("DomainName"))
  795. }
  796. if s.DomainName != nil && len(*s.DomainName) < 1 {
  797. invalidParams.Add(request.NewErrParamMinLen("DomainName", 1))
  798. }
  799. if s.ValidationDomain == nil {
  800. invalidParams.Add(request.NewErrParamRequired("ValidationDomain"))
  801. }
  802. if s.ValidationDomain != nil && len(*s.ValidationDomain) < 1 {
  803. invalidParams.Add(request.NewErrParamMinLen("ValidationDomain", 1))
  804. }
  805. if invalidParams.Len() > 0 {
  806. return invalidParams
  807. }
  808. return nil
  809. }
  810. type GetCertificateInput struct {
  811. _ struct{} `type:"structure"`
  812. // String that contains a certificate ARN in the following format:
  813. //
  814. // arn:aws:acm:region:123456789012:certificate/12345678-1234-1234-1234-123456789012
  815. //
  816. // For more information about ARNs, see Amazon Resource Names (ARNs) and AWS
  817. // Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html).
  818. CertificateArn *string `min:"20" type:"string" required:"true"`
  819. }
  820. // String returns the string representation
  821. func (s GetCertificateInput) String() string {
  822. return awsutil.Prettify(s)
  823. }
  824. // GoString returns the string representation
  825. func (s GetCertificateInput) GoString() string {
  826. return s.String()
  827. }
  828. // Validate inspects the fields of the type to determine if they are valid.
  829. func (s *GetCertificateInput) Validate() error {
  830. invalidParams := request.ErrInvalidParams{Context: "GetCertificateInput"}
  831. if s.CertificateArn == nil {
  832. invalidParams.Add(request.NewErrParamRequired("CertificateArn"))
  833. }
  834. if s.CertificateArn != nil && len(*s.CertificateArn) < 20 {
  835. invalidParams.Add(request.NewErrParamMinLen("CertificateArn", 20))
  836. }
  837. if invalidParams.Len() > 0 {
  838. return invalidParams
  839. }
  840. return nil
  841. }
  842. type GetCertificateOutput struct {
  843. _ struct{} `type:"structure"`
  844. // String that contains the ACM Certificate represented by the ARN specified
  845. // at input.
  846. Certificate *string `min:"1" type:"string"`
  847. // The certificate chain that contains the root certificate issued by the certificate
  848. // authority (CA).
  849. CertificateChain *string `min:"1" type:"string"`
  850. }
  851. // String returns the string representation
  852. func (s GetCertificateOutput) String() string {
  853. return awsutil.Prettify(s)
  854. }
  855. // GoString returns the string representation
  856. func (s GetCertificateOutput) GoString() string {
  857. return s.String()
  858. }
  859. type ListCertificatesInput struct {
  860. _ struct{} `type:"structure"`
  861. // The status or statuses on which to filter the list of ACM Certificates.
  862. CertificateStatuses []*string `type:"list"`
  863. // Use this parameter when paginating results to specify the maximum number
  864. // of items to return in the response. If additional items exist beyond the
  865. // number you specify, the NextToken element is sent in the response. Use this
  866. // NextToken value in a subsequent request to retrieve additional items.
  867. MaxItems *int64 `min:"1" type:"integer"`
  868. // Use this parameter only when paginating results and only in a subsequent
  869. // request after you receive a response with truncated results. Set it to the
  870. // value of NextToken from the response you just received.
  871. NextToken *string `min:"1" type:"string"`
  872. }
  873. // String returns the string representation
  874. func (s ListCertificatesInput) String() string {
  875. return awsutil.Prettify(s)
  876. }
  877. // GoString returns the string representation
  878. func (s ListCertificatesInput) GoString() string {
  879. return s.String()
  880. }
  881. // Validate inspects the fields of the type to determine if they are valid.
  882. func (s *ListCertificatesInput) Validate() error {
  883. invalidParams := request.ErrInvalidParams{Context: "ListCertificatesInput"}
  884. if s.MaxItems != nil && *s.MaxItems < 1 {
  885. invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1))
  886. }
  887. if s.NextToken != nil && len(*s.NextToken) < 1 {
  888. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  889. }
  890. if invalidParams.Len() > 0 {
  891. return invalidParams
  892. }
  893. return nil
  894. }
  895. type ListCertificatesOutput struct {
  896. _ struct{} `type:"structure"`
  897. // A list of ACM Certificates.
  898. CertificateSummaryList []*CertificateSummary `type:"list"`
  899. // When the list is truncated, this value is present and contains the value
  900. // to use for the NextToken parameter in a subsequent pagination request.
  901. NextToken *string `min:"1" type:"string"`
  902. }
  903. // String returns the string representation
  904. func (s ListCertificatesOutput) String() string {
  905. return awsutil.Prettify(s)
  906. }
  907. // GoString returns the string representation
  908. func (s ListCertificatesOutput) GoString() string {
  909. return s.String()
  910. }
  911. type ListTagsForCertificateInput struct {
  912. _ struct{} `type:"structure"`
  913. // String that contains the ARN of the ACM Certificate for which you want to
  914. // list the tags. This must be of the form:
  915. //
  916. // arn:aws:acm:region:123456789012:certificate/12345678-1234-1234-1234-123456789012
  917. //
  918. // For more information about ARNs, see Amazon Resource Names (ARNs) and AWS
  919. // Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html).
  920. CertificateArn *string `min:"20" type:"string" required:"true"`
  921. }
  922. // String returns the string representation
  923. func (s ListTagsForCertificateInput) String() string {
  924. return awsutil.Prettify(s)
  925. }
  926. // GoString returns the string representation
  927. func (s ListTagsForCertificateInput) GoString() string {
  928. return s.String()
  929. }
  930. // Validate inspects the fields of the type to determine if they are valid.
  931. func (s *ListTagsForCertificateInput) Validate() error {
  932. invalidParams := request.ErrInvalidParams{Context: "ListTagsForCertificateInput"}
  933. if s.CertificateArn == nil {
  934. invalidParams.Add(request.NewErrParamRequired("CertificateArn"))
  935. }
  936. if s.CertificateArn != nil && len(*s.CertificateArn) < 20 {
  937. invalidParams.Add(request.NewErrParamMinLen("CertificateArn", 20))
  938. }
  939. if invalidParams.Len() > 0 {
  940. return invalidParams
  941. }
  942. return nil
  943. }
  944. type ListTagsForCertificateOutput struct {
  945. _ struct{} `type:"structure"`
  946. // The key-value pairs that define the applied tags.
  947. Tags []*Tag `min:"1" type:"list"`
  948. }
  949. // String returns the string representation
  950. func (s ListTagsForCertificateOutput) String() string {
  951. return awsutil.Prettify(s)
  952. }
  953. // GoString returns the string representation
  954. func (s ListTagsForCertificateOutput) GoString() string {
  955. return s.String()
  956. }
  957. type RemoveTagsFromCertificateInput struct {
  958. _ struct{} `type:"structure"`
  959. // String that contains the ARN of the ACM Certificate with one or more tags
  960. // that you want to remove. This must be of the form:
  961. //
  962. // arn:aws:acm:region:123456789012:certificate/12345678-1234-1234-1234-123456789012
  963. //
  964. // For more information about ARNs, see Amazon Resource Names (ARNs) and AWS
  965. // Service Namespaces (http://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html).
  966. CertificateArn *string `min:"20" type:"string" required:"true"`
  967. // The key-value pair that defines the tag to remove.
  968. Tags []*Tag `min:"1" type:"list" required:"true"`
  969. }
  970. // String returns the string representation
  971. func (s RemoveTagsFromCertificateInput) String() string {
  972. return awsutil.Prettify(s)
  973. }
  974. // GoString returns the string representation
  975. func (s RemoveTagsFromCertificateInput) GoString() string {
  976. return s.String()
  977. }
  978. // Validate inspects the fields of the type to determine if they are valid.
  979. func (s *RemoveTagsFromCertificateInput) Validate() error {
  980. invalidParams := request.ErrInvalidParams{Context: "RemoveTagsFromCertificateInput"}
  981. if s.CertificateArn == nil {
  982. invalidParams.Add(request.NewErrParamRequired("CertificateArn"))
  983. }
  984. if s.CertificateArn != nil && len(*s.CertificateArn) < 20 {
  985. invalidParams.Add(request.NewErrParamMinLen("CertificateArn", 20))
  986. }
  987. if s.Tags == nil {
  988. invalidParams.Add(request.NewErrParamRequired("Tags"))
  989. }
  990. if s.Tags != nil && len(s.Tags) < 1 {
  991. invalidParams.Add(request.NewErrParamMinLen("Tags", 1))
  992. }
  993. if s.Tags != nil {
  994. for i, v := range s.Tags {
  995. if v == nil {
  996. continue
  997. }
  998. if err := v.Validate(); err != nil {
  999. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  1000. }
  1001. }
  1002. }
  1003. if invalidParams.Len() > 0 {
  1004. return invalidParams
  1005. }
  1006. return nil
  1007. }
  1008. type RemoveTagsFromCertificateOutput struct {
  1009. _ struct{} `type:"structure"`
  1010. }
  1011. // String returns the string representation
  1012. func (s RemoveTagsFromCertificateOutput) String() string {
  1013. return awsutil.Prettify(s)
  1014. }
  1015. // GoString returns the string representation
  1016. func (s RemoveTagsFromCertificateOutput) GoString() string {
  1017. return s.String()
  1018. }
  1019. type RequestCertificateInput struct {
  1020. _ struct{} `type:"structure"`
  1021. // Fully qualified domain name (FQDN), such as www.example.com, of the site
  1022. // you want to secure with an ACM Certificate. Use an asterisk (*) to create
  1023. // a wildcard certificate that protects several sites in the same domain. For
  1024. // example, *.example.com protects www.example.com, site.example.com, and images.example.com.
  1025. DomainName *string `min:"1" type:"string" required:"true"`
  1026. // The base validation domain that will act as the suffix of the email addresses
  1027. // that are used to send the emails. This must be the same as the Domain value
  1028. // or a superdomain of the Domain value. For example, if you requested a certificate
  1029. // for test.example.com and specify DomainValidationOptions of example.com,
  1030. // ACM sends email to the domain registrant, technical contact, and administrative
  1031. // contact in WHOIS and the following five addresses:
  1032. //
  1033. // admin@example.com
  1034. //
  1035. // administrator@example.com
  1036. //
  1037. // hostmaster@example.com
  1038. //
  1039. // postmaster@example.com
  1040. //
  1041. // webmaster@example.com
  1042. DomainValidationOptions []*DomainValidationOption `min:"1" type:"list"`
  1043. // Customer chosen string that can be used to distinguish between calls to RequestCertificate.
  1044. // Idempotency tokens time out after one hour. Therefore, if you call RequestCertificate
  1045. // multiple times with the same idempotency token within one hour, ACM recognizes
  1046. // that you are requesting only one certificate and will issue only one. If
  1047. // you change the idempotency token for each call, ACM recognizes that you are
  1048. // requesting multiple certificates.
  1049. IdempotencyToken *string `min:"1" type:"string"`
  1050. // Additional FQDNs to be included in the Subject Alternative Name extension
  1051. // of the ACM Certificate. For example, add the name www.example.net to a certificate
  1052. // for which the DomainName field is www.example.com if users can reach your
  1053. // site by using either name.
  1054. SubjectAlternativeNames []*string `min:"1" type:"list"`
  1055. }
  1056. // String returns the string representation
  1057. func (s RequestCertificateInput) String() string {
  1058. return awsutil.Prettify(s)
  1059. }
  1060. // GoString returns the string representation
  1061. func (s RequestCertificateInput) GoString() string {
  1062. return s.String()
  1063. }
  1064. // Validate inspects the fields of the type to determine if they are valid.
  1065. func (s *RequestCertificateInput) Validate() error {
  1066. invalidParams := request.ErrInvalidParams{Context: "RequestCertificateInput"}
  1067. if s.DomainName == nil {
  1068. invalidParams.Add(request.NewErrParamRequired("DomainName"))
  1069. }
  1070. if s.DomainName != nil && len(*s.DomainName) < 1 {
  1071. invalidParams.Add(request.NewErrParamMinLen("DomainName", 1))
  1072. }
  1073. if s.DomainValidationOptions != nil && len(s.DomainValidationOptions) < 1 {
  1074. invalidParams.Add(request.NewErrParamMinLen("DomainValidationOptions", 1))
  1075. }
  1076. if s.IdempotencyToken != nil && len(*s.IdempotencyToken) < 1 {
  1077. invalidParams.Add(request.NewErrParamMinLen("IdempotencyToken", 1))
  1078. }
  1079. if s.SubjectAlternativeNames != nil && len(s.SubjectAlternativeNames) < 1 {
  1080. invalidParams.Add(request.NewErrParamMinLen("SubjectAlternativeNames", 1))
  1081. }
  1082. if s.DomainValidationOptions != nil {
  1083. for i, v := range s.DomainValidationOptions {
  1084. if v == nil {
  1085. continue
  1086. }
  1087. if err := v.Validate(); err != nil {
  1088. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "DomainValidationOptions", i), err.(request.ErrInvalidParams))
  1089. }
  1090. }
  1091. }
  1092. if invalidParams.Len() > 0 {
  1093. return invalidParams
  1094. }
  1095. return nil
  1096. }
  1097. type RequestCertificateOutput struct {
  1098. _ struct{} `type:"structure"`
  1099. // String that contains the ARN of the issued certificate. This must be of the
  1100. // form:
  1101. //
  1102. // arn:aws:acm:us-east-1:123456789012:certificate/12345678-1234-1234-1234-123456789012
  1103. CertificateArn *string `min:"20" type:"string"`
  1104. }
  1105. // String returns the string representation
  1106. func (s RequestCertificateOutput) String() string {
  1107. return awsutil.Prettify(s)
  1108. }
  1109. // GoString returns the string representation
  1110. func (s RequestCertificateOutput) GoString() string {
  1111. return s.String()
  1112. }
  1113. type ResendValidationEmailInput struct {
  1114. _ struct{} `type:"structure"`
  1115. // String that contains the ARN of the requested certificate. The certificate
  1116. // ARN is generated and returned by the RequestCertificate action as soon as
  1117. // the request is made. By default, using this parameter causes email to be
  1118. // sent to all top-level domains you specified in the certificate request.
  1119. //
  1120. // The ARN must be of the form:
  1121. //
  1122. // arn:aws:acm:us-east-1:123456789012:certificate/12345678-1234-1234-1234-123456789012
  1123. CertificateArn *string `min:"20" type:"string" required:"true"`
  1124. // The Fully Qualified Domain Name (FQDN) of the certificate that needs to be
  1125. // validated.
  1126. Domain *string `min:"1" type:"string" required:"true"`
  1127. // The base validation domain that will act as the suffix of the email addresses
  1128. // that are used to send the emails. This must be the same as the Domain value
  1129. // or a superdomain of the Domain value. For example, if you requested a certificate
  1130. // for site.subdomain.example.com and specify a ValidationDomain of subdomain.example.com,
  1131. // ACM sends email to the domain registrant, technical contact, and administrative
  1132. // contact in WHOIS and the following five addresses:
  1133. //
  1134. // admin@subdomain.example.com
  1135. //
  1136. // administrator@subdomain.example.com
  1137. //
  1138. // hostmaster@subdomain.example.com
  1139. //
  1140. // postmaster@subdomain.example.com
  1141. //
  1142. // webmaster@subdomain.example.com
  1143. ValidationDomain *string `min:"1" type:"string" required:"true"`
  1144. }
  1145. // String returns the string representation
  1146. func (s ResendValidationEmailInput) String() string {
  1147. return awsutil.Prettify(s)
  1148. }
  1149. // GoString returns the string representation
  1150. func (s ResendValidationEmailInput) GoString() string {
  1151. return s.String()
  1152. }
  1153. // Validate inspects the fields of the type to determine if they are valid.
  1154. func (s *ResendValidationEmailInput) Validate() error {
  1155. invalidParams := request.ErrInvalidParams{Context: "ResendValidationEmailInput"}
  1156. if s.CertificateArn == nil {
  1157. invalidParams.Add(request.NewErrParamRequired("CertificateArn"))
  1158. }
  1159. if s.CertificateArn != nil && len(*s.CertificateArn) < 20 {
  1160. invalidParams.Add(request.NewErrParamMinLen("CertificateArn", 20))
  1161. }
  1162. if s.Domain == nil {
  1163. invalidParams.Add(request.NewErrParamRequired("Domain"))
  1164. }
  1165. if s.Domain != nil && len(*s.Domain) < 1 {
  1166. invalidParams.Add(request.NewErrParamMinLen("Domain", 1))
  1167. }
  1168. if s.ValidationDomain == nil {
  1169. invalidParams.Add(request.NewErrParamRequired("ValidationDomain"))
  1170. }
  1171. if s.ValidationDomain != nil && len(*s.ValidationDomain) < 1 {
  1172. invalidParams.Add(request.NewErrParamMinLen("ValidationDomain", 1))
  1173. }
  1174. if invalidParams.Len() > 0 {
  1175. return invalidParams
  1176. }
  1177. return nil
  1178. }
  1179. type ResendValidationEmailOutput struct {
  1180. _ struct{} `type:"structure"`
  1181. }
  1182. // String returns the string representation
  1183. func (s ResendValidationEmailOutput) String() string {
  1184. return awsutil.Prettify(s)
  1185. }
  1186. // GoString returns the string representation
  1187. func (s ResendValidationEmailOutput) GoString() string {
  1188. return s.String()
  1189. }
  1190. // A key-value pair that identifies or specifies metadata about an ACM resource.
  1191. type Tag struct {
  1192. _ struct{} `type:"structure"`
  1193. // The key of the tag.
  1194. Key *string `min:"1" type:"string" required:"true"`
  1195. // The value of the tag.
  1196. Value *string `type:"string"`
  1197. }
  1198. // String returns the string representation
  1199. func (s Tag) String() string {
  1200. return awsutil.Prettify(s)
  1201. }
  1202. // GoString returns the string representation
  1203. func (s Tag) GoString() string {
  1204. return s.String()
  1205. }
  1206. // Validate inspects the fields of the type to determine if they are valid.
  1207. func (s *Tag) Validate() error {
  1208. invalidParams := request.ErrInvalidParams{Context: "Tag"}
  1209. if s.Key == nil {
  1210. invalidParams.Add(request.NewErrParamRequired("Key"))
  1211. }
  1212. if s.Key != nil && len(*s.Key) < 1 {
  1213. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  1214. }
  1215. if invalidParams.Len() > 0 {
  1216. return invalidParams
  1217. }
  1218. return nil
  1219. }
  1220. const (
  1221. // @enum CertificateStatus
  1222. CertificateStatusPendingValidation = "PENDING_VALIDATION"
  1223. // @enum CertificateStatus
  1224. CertificateStatusIssued = "ISSUED"
  1225. // @enum CertificateStatus
  1226. CertificateStatusInactive = "INACTIVE"
  1227. // @enum CertificateStatus
  1228. CertificateStatusExpired = "EXPIRED"
  1229. // @enum CertificateStatus
  1230. CertificateStatusValidationTimedOut = "VALIDATION_TIMED_OUT"
  1231. // @enum CertificateStatus
  1232. CertificateStatusRevoked = "REVOKED"
  1233. // @enum CertificateStatus
  1234. CertificateStatusFailed = "FAILED"
  1235. )
  1236. const (
  1237. // @enum FailureReason
  1238. FailureReasonNoAvailableContacts = "NO_AVAILABLE_CONTACTS"
  1239. // @enum FailureReason
  1240. FailureReasonAdditionalVerificationRequired = "ADDITIONAL_VERIFICATION_REQUIRED"
  1241. // @enum FailureReason
  1242. FailureReasonDomainNotAllowed = "DOMAIN_NOT_ALLOWED"
  1243. // @enum FailureReason
  1244. FailureReasonInvalidPublicDomain = "INVALID_PUBLIC_DOMAIN"
  1245. // @enum FailureReason
  1246. FailureReasonOther = "OTHER"
  1247. )
  1248. const (
  1249. // @enum KeyAlgorithm
  1250. KeyAlgorithmRsa2048 = "RSA_2048"
  1251. // @enum KeyAlgorithm
  1252. KeyAlgorithmEcPrime256v1 = "EC_prime256v1"
  1253. )
  1254. const (
  1255. // @enum RevocationReason
  1256. RevocationReasonUnspecified = "UNSPECIFIED"
  1257. // @enum RevocationReason
  1258. RevocationReasonKeyCompromise = "KEY_COMPROMISE"
  1259. // @enum RevocationReason
  1260. RevocationReasonCaCompromise = "CA_COMPROMISE"
  1261. // @enum RevocationReason
  1262. RevocationReasonAffiliationChanged = "AFFILIATION_CHANGED"
  1263. // @enum RevocationReason
  1264. RevocationReasonSuperceded = "SUPERCEDED"
  1265. // @enum RevocationReason
  1266. RevocationReasonCessationOfOperation = "CESSATION_OF_OPERATION"
  1267. // @enum RevocationReason
  1268. RevocationReasonCertificateHold = "CERTIFICATE_HOLD"
  1269. // @enum RevocationReason
  1270. RevocationReasonRemoveFromCrl = "REMOVE_FROM_CRL"
  1271. // @enum RevocationReason
  1272. RevocationReasonPrivilegeWithdrawn = "PRIVILEGE_WITHDRAWN"
  1273. // @enum RevocationReason
  1274. RevocationReasonAACompromise = "A_A_COMPROMISE"
  1275. )