api.go 156 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145
  1. // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
  2. package acmpca
  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 opCreateCertificateAuthority = "CreateCertificateAuthority"
  13. // CreateCertificateAuthorityRequest generates a "aws/request.Request" representing the
  14. // client's request for the CreateCertificateAuthority 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 CreateCertificateAuthority for more information on using the CreateCertificateAuthority
  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 CreateCertificateAuthorityRequest method.
  29. // req, resp := client.CreateCertificateAuthorityRequest(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/acm-pca-2017-08-22/CreateCertificateAuthority
  37. func (c *ACMPCA) CreateCertificateAuthorityRequest(input *CreateCertificateAuthorityInput) (req *request.Request, output *CreateCertificateAuthorityOutput) {
  38. op := &request.Operation{
  39. Name: opCreateCertificateAuthority,
  40. HTTPMethod: "POST",
  41. HTTPPath: "/",
  42. }
  43. if input == nil {
  44. input = &CreateCertificateAuthorityInput{}
  45. }
  46. output = &CreateCertificateAuthorityOutput{}
  47. req = c.newRequest(op, input, output)
  48. return
  49. }
  50. // CreateCertificateAuthority API operation for AWS Certificate Manager Private Certificate Authority.
  51. //
  52. // Creates a private subordinate certificate authority (CA). You must specify
  53. // the CA configuration, the revocation configuration, the CA type, and an optional
  54. // idempotency token. The CA configuration specifies the name of the algorithm
  55. // and key size to be used to create the CA private key, the type of signing
  56. // algorithm that the CA uses to sign, and X.500 subject information. The CRL
  57. // (certificate revocation list) configuration specifies the CRL expiration
  58. // period in days (the validity period of the CRL), the Amazon S3 bucket that
  59. // will contain the CRL, and a CNAME alias for the S3 bucket that is included
  60. // in certificates issued by the CA. If successful, this operation returns the
  61. // Amazon Resource Name (ARN) of the CA.
  62. //
  63. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  64. // with awserr.Error's Code and Message methods to get detailed information about
  65. // the error.
  66. //
  67. // See the AWS API reference guide for AWS Certificate Manager Private Certificate Authority's
  68. // API operation CreateCertificateAuthority for usage and error information.
  69. //
  70. // Returned Error Codes:
  71. // * ErrCodeInvalidArgsException "InvalidArgsException"
  72. // One or more of the specified arguments was not valid.
  73. //
  74. // * ErrCodeInvalidPolicyException "InvalidPolicyException"
  75. // The S3 bucket policy is not valid. The policy must give ACM PCA rights to
  76. // read from and write to the bucket and find the bucket location.
  77. //
  78. // * ErrCodeInvalidTagException "InvalidTagException"
  79. // The tag associated with the CA is not valid. The invalid argument is contained
  80. // in the message field.
  81. //
  82. // * ErrCodeLimitExceededException "LimitExceededException"
  83. // An ACM PCA limit has been exceeded. See the exception message returned to
  84. // determine the limit that was exceeded.
  85. //
  86. // See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/CreateCertificateAuthority
  87. func (c *ACMPCA) CreateCertificateAuthority(input *CreateCertificateAuthorityInput) (*CreateCertificateAuthorityOutput, error) {
  88. req, out := c.CreateCertificateAuthorityRequest(input)
  89. return out, req.Send()
  90. }
  91. // CreateCertificateAuthorityWithContext is the same as CreateCertificateAuthority with the addition of
  92. // the ability to pass a context and additional request options.
  93. //
  94. // See CreateCertificateAuthority for details on how to use this API operation.
  95. //
  96. // The context must be non-nil and will be used for request cancellation. If
  97. // the context is nil a panic will occur. In the future the SDK may create
  98. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  99. // for more information on using Contexts.
  100. func (c *ACMPCA) CreateCertificateAuthorityWithContext(ctx aws.Context, input *CreateCertificateAuthorityInput, opts ...request.Option) (*CreateCertificateAuthorityOutput, error) {
  101. req, out := c.CreateCertificateAuthorityRequest(input)
  102. req.SetContext(ctx)
  103. req.ApplyOptions(opts...)
  104. return out, req.Send()
  105. }
  106. const opCreateCertificateAuthorityAuditReport = "CreateCertificateAuthorityAuditReport"
  107. // CreateCertificateAuthorityAuditReportRequest generates a "aws/request.Request" representing the
  108. // client's request for the CreateCertificateAuthorityAuditReport operation. The "output" return
  109. // value will be populated with the request's response once the request completes
  110. // successfully.
  111. //
  112. // Use "Send" method on the returned Request to send the API call to the service.
  113. // the "output" return value is not valid until after Send returns without error.
  114. //
  115. // See CreateCertificateAuthorityAuditReport for more information on using the CreateCertificateAuthorityAuditReport
  116. // API call, and error handling.
  117. //
  118. // This method is useful when you want to inject custom logic or configuration
  119. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  120. //
  121. //
  122. // // Example sending a request using the CreateCertificateAuthorityAuditReportRequest method.
  123. // req, resp := client.CreateCertificateAuthorityAuditReportRequest(params)
  124. //
  125. // err := req.Send()
  126. // if err == nil { // resp is now filled
  127. // fmt.Println(resp)
  128. // }
  129. //
  130. // See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/CreateCertificateAuthorityAuditReport
  131. func (c *ACMPCA) CreateCertificateAuthorityAuditReportRequest(input *CreateCertificateAuthorityAuditReportInput) (req *request.Request, output *CreateCertificateAuthorityAuditReportOutput) {
  132. op := &request.Operation{
  133. Name: opCreateCertificateAuthorityAuditReport,
  134. HTTPMethod: "POST",
  135. HTTPPath: "/",
  136. }
  137. if input == nil {
  138. input = &CreateCertificateAuthorityAuditReportInput{}
  139. }
  140. output = &CreateCertificateAuthorityAuditReportOutput{}
  141. req = c.newRequest(op, input, output)
  142. return
  143. }
  144. // CreateCertificateAuthorityAuditReport API operation for AWS Certificate Manager Private Certificate Authority.
  145. //
  146. // Creates an audit report that lists every time that the your CA private key
  147. // is used. The report is saved in the Amazon S3 bucket that you specify on
  148. // input. The IssueCertificate and RevokeCertificate operations use the private
  149. // key. You can generate a new report every 30 minutes.
  150. //
  151. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  152. // with awserr.Error's Code and Message methods to get detailed information about
  153. // the error.
  154. //
  155. // See the AWS API reference guide for AWS Certificate Manager Private Certificate Authority's
  156. // API operation CreateCertificateAuthorityAuditReport for usage and error information.
  157. //
  158. // Returned Error Codes:
  159. // * ErrCodeRequestInProgressException "RequestInProgressException"
  160. // Your request is already in progress.
  161. //
  162. // * ErrCodeRequestFailedException "RequestFailedException"
  163. // The request has failed for an unspecified reason.
  164. //
  165. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  166. // A resource such as a private CA, S3 bucket, certificate, or audit report
  167. // cannot be found.
  168. //
  169. // * ErrCodeInvalidArnException "InvalidArnException"
  170. // The requested Amazon Resource Name (ARN) does not refer to an existing resource.
  171. //
  172. // * ErrCodeInvalidArgsException "InvalidArgsException"
  173. // One or more of the specified arguments was not valid.
  174. //
  175. // * ErrCodeInvalidStateException "InvalidStateException"
  176. // The private CA is in a state during which a report or certificate cannot
  177. // be generated.
  178. //
  179. // See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/CreateCertificateAuthorityAuditReport
  180. func (c *ACMPCA) CreateCertificateAuthorityAuditReport(input *CreateCertificateAuthorityAuditReportInput) (*CreateCertificateAuthorityAuditReportOutput, error) {
  181. req, out := c.CreateCertificateAuthorityAuditReportRequest(input)
  182. return out, req.Send()
  183. }
  184. // CreateCertificateAuthorityAuditReportWithContext is the same as CreateCertificateAuthorityAuditReport with the addition of
  185. // the ability to pass a context and additional request options.
  186. //
  187. // See CreateCertificateAuthorityAuditReport for details on how to use this API operation.
  188. //
  189. // The context must be non-nil and will be used for request cancellation. If
  190. // the context is nil a panic will occur. In the future the SDK may create
  191. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  192. // for more information on using Contexts.
  193. func (c *ACMPCA) CreateCertificateAuthorityAuditReportWithContext(ctx aws.Context, input *CreateCertificateAuthorityAuditReportInput, opts ...request.Option) (*CreateCertificateAuthorityAuditReportOutput, error) {
  194. req, out := c.CreateCertificateAuthorityAuditReportRequest(input)
  195. req.SetContext(ctx)
  196. req.ApplyOptions(opts...)
  197. return out, req.Send()
  198. }
  199. const opDeleteCertificateAuthority = "DeleteCertificateAuthority"
  200. // DeleteCertificateAuthorityRequest generates a "aws/request.Request" representing the
  201. // client's request for the DeleteCertificateAuthority operation. The "output" return
  202. // value will be populated with the request's response once the request completes
  203. // successfully.
  204. //
  205. // Use "Send" method on the returned Request to send the API call to the service.
  206. // the "output" return value is not valid until after Send returns without error.
  207. //
  208. // See DeleteCertificateAuthority for more information on using the DeleteCertificateAuthority
  209. // API call, and error handling.
  210. //
  211. // This method is useful when you want to inject custom logic or configuration
  212. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  213. //
  214. //
  215. // // Example sending a request using the DeleteCertificateAuthorityRequest method.
  216. // req, resp := client.DeleteCertificateAuthorityRequest(params)
  217. //
  218. // err := req.Send()
  219. // if err == nil { // resp is now filled
  220. // fmt.Println(resp)
  221. // }
  222. //
  223. // See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/DeleteCertificateAuthority
  224. func (c *ACMPCA) DeleteCertificateAuthorityRequest(input *DeleteCertificateAuthorityInput) (req *request.Request, output *DeleteCertificateAuthorityOutput) {
  225. op := &request.Operation{
  226. Name: opDeleteCertificateAuthority,
  227. HTTPMethod: "POST",
  228. HTTPPath: "/",
  229. }
  230. if input == nil {
  231. input = &DeleteCertificateAuthorityInput{}
  232. }
  233. output = &DeleteCertificateAuthorityOutput{}
  234. req = c.newRequest(op, input, output)
  235. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  236. return
  237. }
  238. // DeleteCertificateAuthority API operation for AWS Certificate Manager Private Certificate Authority.
  239. //
  240. // Deletes a private certificate authority (CA). You must provide the ARN (Amazon
  241. // Resource Name) of the private CA that you want to delete. You can find the
  242. // ARN by calling the ListCertificateAuthorities operation. Before you can delete
  243. // a CA, you must disable it. Call the UpdateCertificateAuthority operation
  244. // and set the CertificateAuthorityStatus parameter to DISABLED.
  245. //
  246. // Additionally, you can delete a CA if you are waiting for it to be created
  247. // (the Status field of the CertificateAuthority is CREATING). You can also
  248. // delete it if the CA has been created but you haven't yet imported the signed
  249. // certificate (the Status is PENDING_CERTIFICATE) into ACM PCA.
  250. //
  251. // If the CA is in one of the aforementioned states and you call DeleteCertificateAuthority,
  252. // the CA's status changes to DELETED. However, the CA won't be permentantly
  253. // deleted until the restoration period has passed. By default, if you do not
  254. // set the PermanentDeletionTimeInDays parameter, the CA remains restorable
  255. // for 30 days. You can set the parameter from 7 to 30 days. The DescribeCertificateAuthority
  256. // operation returns the time remaining in the restoration window of a Private
  257. // CA in the DELETED state. To restore an eligable CA, call the RestoreCertificateAuthority
  258. // operation.
  259. //
  260. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  261. // with awserr.Error's Code and Message methods to get detailed information about
  262. // the error.
  263. //
  264. // See the AWS API reference guide for AWS Certificate Manager Private Certificate Authority's
  265. // API operation DeleteCertificateAuthority for usage and error information.
  266. //
  267. // Returned Error Codes:
  268. // * ErrCodeConcurrentModificationException "ConcurrentModificationException"
  269. // A previous update to your private CA is still ongoing.
  270. //
  271. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  272. // A resource such as a private CA, S3 bucket, certificate, or audit report
  273. // cannot be found.
  274. //
  275. // * ErrCodeInvalidArnException "InvalidArnException"
  276. // The requested Amazon Resource Name (ARN) does not refer to an existing resource.
  277. //
  278. // * ErrCodeInvalidStateException "InvalidStateException"
  279. // The private CA is in a state during which a report or certificate cannot
  280. // be generated.
  281. //
  282. // See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/DeleteCertificateAuthority
  283. func (c *ACMPCA) DeleteCertificateAuthority(input *DeleteCertificateAuthorityInput) (*DeleteCertificateAuthorityOutput, error) {
  284. req, out := c.DeleteCertificateAuthorityRequest(input)
  285. return out, req.Send()
  286. }
  287. // DeleteCertificateAuthorityWithContext is the same as DeleteCertificateAuthority with the addition of
  288. // the ability to pass a context and additional request options.
  289. //
  290. // See DeleteCertificateAuthority for details on how to use this API operation.
  291. //
  292. // The context must be non-nil and will be used for request cancellation. If
  293. // the context is nil a panic will occur. In the future the SDK may create
  294. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  295. // for more information on using Contexts.
  296. func (c *ACMPCA) DeleteCertificateAuthorityWithContext(ctx aws.Context, input *DeleteCertificateAuthorityInput, opts ...request.Option) (*DeleteCertificateAuthorityOutput, error) {
  297. req, out := c.DeleteCertificateAuthorityRequest(input)
  298. req.SetContext(ctx)
  299. req.ApplyOptions(opts...)
  300. return out, req.Send()
  301. }
  302. const opDescribeCertificateAuthority = "DescribeCertificateAuthority"
  303. // DescribeCertificateAuthorityRequest generates a "aws/request.Request" representing the
  304. // client's request for the DescribeCertificateAuthority operation. The "output" return
  305. // value will be populated with the request's response once the request completes
  306. // successfully.
  307. //
  308. // Use "Send" method on the returned Request to send the API call to the service.
  309. // the "output" return value is not valid until after Send returns without error.
  310. //
  311. // See DescribeCertificateAuthority for more information on using the DescribeCertificateAuthority
  312. // API call, and error handling.
  313. //
  314. // This method is useful when you want to inject custom logic or configuration
  315. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  316. //
  317. //
  318. // // Example sending a request using the DescribeCertificateAuthorityRequest method.
  319. // req, resp := client.DescribeCertificateAuthorityRequest(params)
  320. //
  321. // err := req.Send()
  322. // if err == nil { // resp is now filled
  323. // fmt.Println(resp)
  324. // }
  325. //
  326. // See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/DescribeCertificateAuthority
  327. func (c *ACMPCA) DescribeCertificateAuthorityRequest(input *DescribeCertificateAuthorityInput) (req *request.Request, output *DescribeCertificateAuthorityOutput) {
  328. op := &request.Operation{
  329. Name: opDescribeCertificateAuthority,
  330. HTTPMethod: "POST",
  331. HTTPPath: "/",
  332. }
  333. if input == nil {
  334. input = &DescribeCertificateAuthorityInput{}
  335. }
  336. output = &DescribeCertificateAuthorityOutput{}
  337. req = c.newRequest(op, input, output)
  338. return
  339. }
  340. // DescribeCertificateAuthority API operation for AWS Certificate Manager Private Certificate Authority.
  341. //
  342. // Lists information about your private certificate authority (CA). You specify
  343. // the private CA on input by its ARN (Amazon Resource Name). The output contains
  344. // the status of your CA. This can be any of the following:
  345. //
  346. // * CREATING - ACM PCA is creating your private certificate authority.
  347. //
  348. // * PENDING_CERTIFICATE - The certificate is pending. You must use your
  349. // on-premises root or subordinate CA to sign your private CA CSR and then
  350. // import it into PCA.
  351. //
  352. // * ACTIVE - Your private CA is active.
  353. //
  354. // * DISABLED - Your private CA has been disabled.
  355. //
  356. // * EXPIRED - Your private CA certificate has expired.
  357. //
  358. // * FAILED - Your private CA has failed. Your CA can fail because of problems
  359. // such a network outage or backend AWS failure or other errors. A failed
  360. // CA can never return to the pending state. You must create a new CA.
  361. //
  362. // * DELETED - Your private CA is within the restoration period, after which
  363. // it is permanently deleted. The length of time remaining in the CA's restoration
  364. // period is also included in this operation's output.
  365. //
  366. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  367. // with awserr.Error's Code and Message methods to get detailed information about
  368. // the error.
  369. //
  370. // See the AWS API reference guide for AWS Certificate Manager Private Certificate Authority's
  371. // API operation DescribeCertificateAuthority for usage and error information.
  372. //
  373. // Returned Error Codes:
  374. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  375. // A resource such as a private CA, S3 bucket, certificate, or audit report
  376. // cannot be found.
  377. //
  378. // * ErrCodeInvalidArnException "InvalidArnException"
  379. // The requested Amazon Resource Name (ARN) does not refer to an existing resource.
  380. //
  381. // See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/DescribeCertificateAuthority
  382. func (c *ACMPCA) DescribeCertificateAuthority(input *DescribeCertificateAuthorityInput) (*DescribeCertificateAuthorityOutput, error) {
  383. req, out := c.DescribeCertificateAuthorityRequest(input)
  384. return out, req.Send()
  385. }
  386. // DescribeCertificateAuthorityWithContext is the same as DescribeCertificateAuthority with the addition of
  387. // the ability to pass a context and additional request options.
  388. //
  389. // See DescribeCertificateAuthority for details on how to use this API operation.
  390. //
  391. // The context must be non-nil and will be used for request cancellation. If
  392. // the context is nil a panic will occur. In the future the SDK may create
  393. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  394. // for more information on using Contexts.
  395. func (c *ACMPCA) DescribeCertificateAuthorityWithContext(ctx aws.Context, input *DescribeCertificateAuthorityInput, opts ...request.Option) (*DescribeCertificateAuthorityOutput, error) {
  396. req, out := c.DescribeCertificateAuthorityRequest(input)
  397. req.SetContext(ctx)
  398. req.ApplyOptions(opts...)
  399. return out, req.Send()
  400. }
  401. const opDescribeCertificateAuthorityAuditReport = "DescribeCertificateAuthorityAuditReport"
  402. // DescribeCertificateAuthorityAuditReportRequest generates a "aws/request.Request" representing the
  403. // client's request for the DescribeCertificateAuthorityAuditReport operation. The "output" return
  404. // value will be populated with the request's response once the request completes
  405. // successfully.
  406. //
  407. // Use "Send" method on the returned Request to send the API call to the service.
  408. // the "output" return value is not valid until after Send returns without error.
  409. //
  410. // See DescribeCertificateAuthorityAuditReport for more information on using the DescribeCertificateAuthorityAuditReport
  411. // API call, and error handling.
  412. //
  413. // This method is useful when you want to inject custom logic or configuration
  414. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  415. //
  416. //
  417. // // Example sending a request using the DescribeCertificateAuthorityAuditReportRequest method.
  418. // req, resp := client.DescribeCertificateAuthorityAuditReportRequest(params)
  419. //
  420. // err := req.Send()
  421. // if err == nil { // resp is now filled
  422. // fmt.Println(resp)
  423. // }
  424. //
  425. // See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/DescribeCertificateAuthorityAuditReport
  426. func (c *ACMPCA) DescribeCertificateAuthorityAuditReportRequest(input *DescribeCertificateAuthorityAuditReportInput) (req *request.Request, output *DescribeCertificateAuthorityAuditReportOutput) {
  427. op := &request.Operation{
  428. Name: opDescribeCertificateAuthorityAuditReport,
  429. HTTPMethod: "POST",
  430. HTTPPath: "/",
  431. }
  432. if input == nil {
  433. input = &DescribeCertificateAuthorityAuditReportInput{}
  434. }
  435. output = &DescribeCertificateAuthorityAuditReportOutput{}
  436. req = c.newRequest(op, input, output)
  437. return
  438. }
  439. // DescribeCertificateAuthorityAuditReport API operation for AWS Certificate Manager Private Certificate Authority.
  440. //
  441. // Lists information about a specific audit report created by calling the CreateCertificateAuthorityAuditReport
  442. // operation. Audit information is created every time the certificate authority
  443. // (CA) private key is used. The private key is used when you call the IssueCertificate
  444. // operation or the RevokeCertificate operation.
  445. //
  446. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  447. // with awserr.Error's Code and Message methods to get detailed information about
  448. // the error.
  449. //
  450. // See the AWS API reference guide for AWS Certificate Manager Private Certificate Authority's
  451. // API operation DescribeCertificateAuthorityAuditReport for usage and error information.
  452. //
  453. // Returned Error Codes:
  454. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  455. // A resource such as a private CA, S3 bucket, certificate, or audit report
  456. // cannot be found.
  457. //
  458. // * ErrCodeInvalidArnException "InvalidArnException"
  459. // The requested Amazon Resource Name (ARN) does not refer to an existing resource.
  460. //
  461. // * ErrCodeInvalidArgsException "InvalidArgsException"
  462. // One or more of the specified arguments was not valid.
  463. //
  464. // See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/DescribeCertificateAuthorityAuditReport
  465. func (c *ACMPCA) DescribeCertificateAuthorityAuditReport(input *DescribeCertificateAuthorityAuditReportInput) (*DescribeCertificateAuthorityAuditReportOutput, error) {
  466. req, out := c.DescribeCertificateAuthorityAuditReportRequest(input)
  467. return out, req.Send()
  468. }
  469. // DescribeCertificateAuthorityAuditReportWithContext is the same as DescribeCertificateAuthorityAuditReport with the addition of
  470. // the ability to pass a context and additional request options.
  471. //
  472. // See DescribeCertificateAuthorityAuditReport for details on how to use this API operation.
  473. //
  474. // The context must be non-nil and will be used for request cancellation. If
  475. // the context is nil a panic will occur. In the future the SDK may create
  476. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  477. // for more information on using Contexts.
  478. func (c *ACMPCA) DescribeCertificateAuthorityAuditReportWithContext(ctx aws.Context, input *DescribeCertificateAuthorityAuditReportInput, opts ...request.Option) (*DescribeCertificateAuthorityAuditReportOutput, error) {
  479. req, out := c.DescribeCertificateAuthorityAuditReportRequest(input)
  480. req.SetContext(ctx)
  481. req.ApplyOptions(opts...)
  482. return out, req.Send()
  483. }
  484. const opGetCertificate = "GetCertificate"
  485. // GetCertificateRequest generates a "aws/request.Request" representing the
  486. // client's request for the GetCertificate operation. The "output" return
  487. // value will be populated with the request's response once the request completes
  488. // successfully.
  489. //
  490. // Use "Send" method on the returned Request to send the API call to the service.
  491. // the "output" return value is not valid until after Send returns without error.
  492. //
  493. // See GetCertificate for more information on using the GetCertificate
  494. // API call, and error handling.
  495. //
  496. // This method is useful when you want to inject custom logic or configuration
  497. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  498. //
  499. //
  500. // // Example sending a request using the GetCertificateRequest method.
  501. // req, resp := client.GetCertificateRequest(params)
  502. //
  503. // err := req.Send()
  504. // if err == nil { // resp is now filled
  505. // fmt.Println(resp)
  506. // }
  507. //
  508. // See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/GetCertificate
  509. func (c *ACMPCA) GetCertificateRequest(input *GetCertificateInput) (req *request.Request, output *GetCertificateOutput) {
  510. op := &request.Operation{
  511. Name: opGetCertificate,
  512. HTTPMethod: "POST",
  513. HTTPPath: "/",
  514. }
  515. if input == nil {
  516. input = &GetCertificateInput{}
  517. }
  518. output = &GetCertificateOutput{}
  519. req = c.newRequest(op, input, output)
  520. return
  521. }
  522. // GetCertificate API operation for AWS Certificate Manager Private Certificate Authority.
  523. //
  524. // Retrieves a certificate from your private CA. The ARN of the certificate
  525. // is returned when you call the IssueCertificate operation. You must specify
  526. // both the ARN of your private CA and the ARN of the issued certificate when
  527. // calling the GetCertificate operation. You can retrieve the certificate if
  528. // it is in the ISSUED state. You can call the CreateCertificateAuthorityAuditReport
  529. // operation to create a report that contains information about all of the certificates
  530. // issued and revoked by your private CA.
  531. //
  532. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  533. // with awserr.Error's Code and Message methods to get detailed information about
  534. // the error.
  535. //
  536. // See the AWS API reference guide for AWS Certificate Manager Private Certificate Authority's
  537. // API operation GetCertificate for usage and error information.
  538. //
  539. // Returned Error Codes:
  540. // * ErrCodeRequestInProgressException "RequestInProgressException"
  541. // Your request is already in progress.
  542. //
  543. // * ErrCodeRequestFailedException "RequestFailedException"
  544. // The request has failed for an unspecified reason.
  545. //
  546. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  547. // A resource such as a private CA, S3 bucket, certificate, or audit report
  548. // cannot be found.
  549. //
  550. // * ErrCodeInvalidArnException "InvalidArnException"
  551. // The requested Amazon Resource Name (ARN) does not refer to an existing resource.
  552. //
  553. // * ErrCodeInvalidStateException "InvalidStateException"
  554. // The private CA is in a state during which a report or certificate cannot
  555. // be generated.
  556. //
  557. // See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/GetCertificate
  558. func (c *ACMPCA) GetCertificate(input *GetCertificateInput) (*GetCertificateOutput, error) {
  559. req, out := c.GetCertificateRequest(input)
  560. return out, req.Send()
  561. }
  562. // GetCertificateWithContext is the same as GetCertificate with the addition of
  563. // the ability to pass a context and additional request options.
  564. //
  565. // See GetCertificate for details on how to use this API operation.
  566. //
  567. // The context must be non-nil and will be used for request cancellation. If
  568. // the context is nil a panic will occur. In the future the SDK may create
  569. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  570. // for more information on using Contexts.
  571. func (c *ACMPCA) GetCertificateWithContext(ctx aws.Context, input *GetCertificateInput, opts ...request.Option) (*GetCertificateOutput, error) {
  572. req, out := c.GetCertificateRequest(input)
  573. req.SetContext(ctx)
  574. req.ApplyOptions(opts...)
  575. return out, req.Send()
  576. }
  577. const opGetCertificateAuthorityCertificate = "GetCertificateAuthorityCertificate"
  578. // GetCertificateAuthorityCertificateRequest generates a "aws/request.Request" representing the
  579. // client's request for the GetCertificateAuthorityCertificate operation. The "output" return
  580. // value will be populated with the request's response once the request completes
  581. // successfully.
  582. //
  583. // Use "Send" method on the returned Request to send the API call to the service.
  584. // the "output" return value is not valid until after Send returns without error.
  585. //
  586. // See GetCertificateAuthorityCertificate for more information on using the GetCertificateAuthorityCertificate
  587. // API call, and error handling.
  588. //
  589. // This method is useful when you want to inject custom logic or configuration
  590. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  591. //
  592. //
  593. // // Example sending a request using the GetCertificateAuthorityCertificateRequest method.
  594. // req, resp := client.GetCertificateAuthorityCertificateRequest(params)
  595. //
  596. // err := req.Send()
  597. // if err == nil { // resp is now filled
  598. // fmt.Println(resp)
  599. // }
  600. //
  601. // See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/GetCertificateAuthorityCertificate
  602. func (c *ACMPCA) GetCertificateAuthorityCertificateRequest(input *GetCertificateAuthorityCertificateInput) (req *request.Request, output *GetCertificateAuthorityCertificateOutput) {
  603. op := &request.Operation{
  604. Name: opGetCertificateAuthorityCertificate,
  605. HTTPMethod: "POST",
  606. HTTPPath: "/",
  607. }
  608. if input == nil {
  609. input = &GetCertificateAuthorityCertificateInput{}
  610. }
  611. output = &GetCertificateAuthorityCertificateOutput{}
  612. req = c.newRequest(op, input, output)
  613. return
  614. }
  615. // GetCertificateAuthorityCertificate API operation for AWS Certificate Manager Private Certificate Authority.
  616. //
  617. // Retrieves the certificate and certificate chain for your private certificate
  618. // authority (CA). Both the certificate and the chain are base64 PEM-encoded.
  619. // The chain does not include the CA certificate. Each certificate in the chain
  620. // signs the one before it.
  621. //
  622. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  623. // with awserr.Error's Code and Message methods to get detailed information about
  624. // the error.
  625. //
  626. // See the AWS API reference guide for AWS Certificate Manager Private Certificate Authority's
  627. // API operation GetCertificateAuthorityCertificate for usage and error information.
  628. //
  629. // Returned Error Codes:
  630. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  631. // A resource such as a private CA, S3 bucket, certificate, or audit report
  632. // cannot be found.
  633. //
  634. // * ErrCodeInvalidStateException "InvalidStateException"
  635. // The private CA is in a state during which a report or certificate cannot
  636. // be generated.
  637. //
  638. // * ErrCodeInvalidArnException "InvalidArnException"
  639. // The requested Amazon Resource Name (ARN) does not refer to an existing resource.
  640. //
  641. // See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/GetCertificateAuthorityCertificate
  642. func (c *ACMPCA) GetCertificateAuthorityCertificate(input *GetCertificateAuthorityCertificateInput) (*GetCertificateAuthorityCertificateOutput, error) {
  643. req, out := c.GetCertificateAuthorityCertificateRequest(input)
  644. return out, req.Send()
  645. }
  646. // GetCertificateAuthorityCertificateWithContext is the same as GetCertificateAuthorityCertificate with the addition of
  647. // the ability to pass a context and additional request options.
  648. //
  649. // See GetCertificateAuthorityCertificate for details on how to use this API operation.
  650. //
  651. // The context must be non-nil and will be used for request cancellation. If
  652. // the context is nil a panic will occur. In the future the SDK may create
  653. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  654. // for more information on using Contexts.
  655. func (c *ACMPCA) GetCertificateAuthorityCertificateWithContext(ctx aws.Context, input *GetCertificateAuthorityCertificateInput, opts ...request.Option) (*GetCertificateAuthorityCertificateOutput, error) {
  656. req, out := c.GetCertificateAuthorityCertificateRequest(input)
  657. req.SetContext(ctx)
  658. req.ApplyOptions(opts...)
  659. return out, req.Send()
  660. }
  661. const opGetCertificateAuthorityCsr = "GetCertificateAuthorityCsr"
  662. // GetCertificateAuthorityCsrRequest generates a "aws/request.Request" representing the
  663. // client's request for the GetCertificateAuthorityCsr operation. The "output" return
  664. // value will be populated with the request's response once the request completes
  665. // successfully.
  666. //
  667. // Use "Send" method on the returned Request to send the API call to the service.
  668. // the "output" return value is not valid until after Send returns without error.
  669. //
  670. // See GetCertificateAuthorityCsr for more information on using the GetCertificateAuthorityCsr
  671. // API call, and error handling.
  672. //
  673. // This method is useful when you want to inject custom logic or configuration
  674. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  675. //
  676. //
  677. // // Example sending a request using the GetCertificateAuthorityCsrRequest method.
  678. // req, resp := client.GetCertificateAuthorityCsrRequest(params)
  679. //
  680. // err := req.Send()
  681. // if err == nil { // resp is now filled
  682. // fmt.Println(resp)
  683. // }
  684. //
  685. // See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/GetCertificateAuthorityCsr
  686. func (c *ACMPCA) GetCertificateAuthorityCsrRequest(input *GetCertificateAuthorityCsrInput) (req *request.Request, output *GetCertificateAuthorityCsrOutput) {
  687. op := &request.Operation{
  688. Name: opGetCertificateAuthorityCsr,
  689. HTTPMethod: "POST",
  690. HTTPPath: "/",
  691. }
  692. if input == nil {
  693. input = &GetCertificateAuthorityCsrInput{}
  694. }
  695. output = &GetCertificateAuthorityCsrOutput{}
  696. req = c.newRequest(op, input, output)
  697. return
  698. }
  699. // GetCertificateAuthorityCsr API operation for AWS Certificate Manager Private Certificate Authority.
  700. //
  701. // Retrieves the certificate signing request (CSR) for your private certificate
  702. // authority (CA). The CSR is created when you call the CreateCertificateAuthority
  703. // operation. Take the CSR to your on-premises X.509 infrastructure and sign
  704. // it by using your root or a subordinate CA. Then import the signed certificate
  705. // back into ACM PCA by calling the ImportCertificateAuthorityCertificate operation.
  706. // The CSR is returned as a base64 PEM-encoded string.
  707. //
  708. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  709. // with awserr.Error's Code and Message methods to get detailed information about
  710. // the error.
  711. //
  712. // See the AWS API reference guide for AWS Certificate Manager Private Certificate Authority's
  713. // API operation GetCertificateAuthorityCsr for usage and error information.
  714. //
  715. // Returned Error Codes:
  716. // * ErrCodeRequestInProgressException "RequestInProgressException"
  717. // Your request is already in progress.
  718. //
  719. // * ErrCodeRequestFailedException "RequestFailedException"
  720. // The request has failed for an unspecified reason.
  721. //
  722. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  723. // A resource such as a private CA, S3 bucket, certificate, or audit report
  724. // cannot be found.
  725. //
  726. // * ErrCodeInvalidArnException "InvalidArnException"
  727. // The requested Amazon Resource Name (ARN) does not refer to an existing resource.
  728. //
  729. // * ErrCodeInvalidStateException "InvalidStateException"
  730. // The private CA is in a state during which a report or certificate cannot
  731. // be generated.
  732. //
  733. // See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/GetCertificateAuthorityCsr
  734. func (c *ACMPCA) GetCertificateAuthorityCsr(input *GetCertificateAuthorityCsrInput) (*GetCertificateAuthorityCsrOutput, error) {
  735. req, out := c.GetCertificateAuthorityCsrRequest(input)
  736. return out, req.Send()
  737. }
  738. // GetCertificateAuthorityCsrWithContext is the same as GetCertificateAuthorityCsr with the addition of
  739. // the ability to pass a context and additional request options.
  740. //
  741. // See GetCertificateAuthorityCsr for details on how to use this API operation.
  742. //
  743. // The context must be non-nil and will be used for request cancellation. If
  744. // the context is nil a panic will occur. In the future the SDK may create
  745. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  746. // for more information on using Contexts.
  747. func (c *ACMPCA) GetCertificateAuthorityCsrWithContext(ctx aws.Context, input *GetCertificateAuthorityCsrInput, opts ...request.Option) (*GetCertificateAuthorityCsrOutput, error) {
  748. req, out := c.GetCertificateAuthorityCsrRequest(input)
  749. req.SetContext(ctx)
  750. req.ApplyOptions(opts...)
  751. return out, req.Send()
  752. }
  753. const opImportCertificateAuthorityCertificate = "ImportCertificateAuthorityCertificate"
  754. // ImportCertificateAuthorityCertificateRequest generates a "aws/request.Request" representing the
  755. // client's request for the ImportCertificateAuthorityCertificate operation. The "output" return
  756. // value will be populated with the request's response once the request completes
  757. // successfully.
  758. //
  759. // Use "Send" method on the returned Request to send the API call to the service.
  760. // the "output" return value is not valid until after Send returns without error.
  761. //
  762. // See ImportCertificateAuthorityCertificate for more information on using the ImportCertificateAuthorityCertificate
  763. // API call, and error handling.
  764. //
  765. // This method is useful when you want to inject custom logic or configuration
  766. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  767. //
  768. //
  769. // // Example sending a request using the ImportCertificateAuthorityCertificateRequest method.
  770. // req, resp := client.ImportCertificateAuthorityCertificateRequest(params)
  771. //
  772. // err := req.Send()
  773. // if err == nil { // resp is now filled
  774. // fmt.Println(resp)
  775. // }
  776. //
  777. // See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/ImportCertificateAuthorityCertificate
  778. func (c *ACMPCA) ImportCertificateAuthorityCertificateRequest(input *ImportCertificateAuthorityCertificateInput) (req *request.Request, output *ImportCertificateAuthorityCertificateOutput) {
  779. op := &request.Operation{
  780. Name: opImportCertificateAuthorityCertificate,
  781. HTTPMethod: "POST",
  782. HTTPPath: "/",
  783. }
  784. if input == nil {
  785. input = &ImportCertificateAuthorityCertificateInput{}
  786. }
  787. output = &ImportCertificateAuthorityCertificateOutput{}
  788. req = c.newRequest(op, input, output)
  789. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  790. return
  791. }
  792. // ImportCertificateAuthorityCertificate API operation for AWS Certificate Manager Private Certificate Authority.
  793. //
  794. // Imports your signed private CA certificate into ACM PCA. Before you can call
  795. // this operation, you must create the private certificate authority by calling
  796. // the CreateCertificateAuthority operation. You must then generate a certificate
  797. // signing request (CSR) by calling the GetCertificateAuthorityCsr operation.
  798. // Take the CSR to your on-premises CA and use the root certificate or a subordinate
  799. // certificate to sign it. Create a certificate chain and copy the signed certificate
  800. // and the certificate chain to your working directory.
  801. //
  802. // Your certificate chain must not include the private CA certificate that you
  803. // are importing.
  804. //
  805. // Your on-premises CA certificate must be the last certificate in your chain.
  806. // The subordinate certificate, if any, that your root CA signed must be next
  807. // to last. The subordinate certificate signed by the preceding subordinate
  808. // CA must come next, and so on until your chain is built.
  809. //
  810. // The chain must be PEM-encoded.
  811. //
  812. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  813. // with awserr.Error's Code and Message methods to get detailed information about
  814. // the error.
  815. //
  816. // See the AWS API reference guide for AWS Certificate Manager Private Certificate Authority's
  817. // API operation ImportCertificateAuthorityCertificate for usage and error information.
  818. //
  819. // Returned Error Codes:
  820. // * ErrCodeConcurrentModificationException "ConcurrentModificationException"
  821. // A previous update to your private CA is still ongoing.
  822. //
  823. // * ErrCodeRequestInProgressException "RequestInProgressException"
  824. // Your request is already in progress.
  825. //
  826. // * ErrCodeRequestFailedException "RequestFailedException"
  827. // The request has failed for an unspecified reason.
  828. //
  829. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  830. // A resource such as a private CA, S3 bucket, certificate, or audit report
  831. // cannot be found.
  832. //
  833. // * ErrCodeInvalidArnException "InvalidArnException"
  834. // The requested Amazon Resource Name (ARN) does not refer to an existing resource.
  835. //
  836. // * ErrCodeInvalidStateException "InvalidStateException"
  837. // The private CA is in a state during which a report or certificate cannot
  838. // be generated.
  839. //
  840. // * ErrCodeMalformedCertificateException "MalformedCertificateException"
  841. // One or more fields in the certificate are invalid.
  842. //
  843. // * ErrCodeCertificateMismatchException "CertificateMismatchException"
  844. // The certificate authority certificate you are importing does not comply with
  845. // conditions specified in the certificate that signed it.
  846. //
  847. // See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/ImportCertificateAuthorityCertificate
  848. func (c *ACMPCA) ImportCertificateAuthorityCertificate(input *ImportCertificateAuthorityCertificateInput) (*ImportCertificateAuthorityCertificateOutput, error) {
  849. req, out := c.ImportCertificateAuthorityCertificateRequest(input)
  850. return out, req.Send()
  851. }
  852. // ImportCertificateAuthorityCertificateWithContext is the same as ImportCertificateAuthorityCertificate with the addition of
  853. // the ability to pass a context and additional request options.
  854. //
  855. // See ImportCertificateAuthorityCertificate for details on how to use this API operation.
  856. //
  857. // The context must be non-nil and will be used for request cancellation. If
  858. // the context is nil a panic will occur. In the future the SDK may create
  859. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  860. // for more information on using Contexts.
  861. func (c *ACMPCA) ImportCertificateAuthorityCertificateWithContext(ctx aws.Context, input *ImportCertificateAuthorityCertificateInput, opts ...request.Option) (*ImportCertificateAuthorityCertificateOutput, error) {
  862. req, out := c.ImportCertificateAuthorityCertificateRequest(input)
  863. req.SetContext(ctx)
  864. req.ApplyOptions(opts...)
  865. return out, req.Send()
  866. }
  867. const opIssueCertificate = "IssueCertificate"
  868. // IssueCertificateRequest generates a "aws/request.Request" representing the
  869. // client's request for the IssueCertificate operation. The "output" return
  870. // value will be populated with the request's response once the request completes
  871. // successfully.
  872. //
  873. // Use "Send" method on the returned Request to send the API call to the service.
  874. // the "output" return value is not valid until after Send returns without error.
  875. //
  876. // See IssueCertificate for more information on using the IssueCertificate
  877. // API call, and error handling.
  878. //
  879. // This method is useful when you want to inject custom logic or configuration
  880. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  881. //
  882. //
  883. // // Example sending a request using the IssueCertificateRequest method.
  884. // req, resp := client.IssueCertificateRequest(params)
  885. //
  886. // err := req.Send()
  887. // if err == nil { // resp is now filled
  888. // fmt.Println(resp)
  889. // }
  890. //
  891. // See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/IssueCertificate
  892. func (c *ACMPCA) IssueCertificateRequest(input *IssueCertificateInput) (req *request.Request, output *IssueCertificateOutput) {
  893. op := &request.Operation{
  894. Name: opIssueCertificate,
  895. HTTPMethod: "POST",
  896. HTTPPath: "/",
  897. }
  898. if input == nil {
  899. input = &IssueCertificateInput{}
  900. }
  901. output = &IssueCertificateOutput{}
  902. req = c.newRequest(op, input, output)
  903. return
  904. }
  905. // IssueCertificate API operation for AWS Certificate Manager Private Certificate Authority.
  906. //
  907. // Uses your private certificate authority (CA) to issue a client certificate.
  908. // This operation returns the Amazon Resource Name (ARN) of the certificate.
  909. // You can retrieve the certificate by calling the GetCertificate operation
  910. // and specifying the ARN.
  911. //
  912. // You cannot use the ACM ListCertificateAuthorities operation to retrieve the
  913. // ARNs of the certificates that you issue by using ACM PCA.
  914. //
  915. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  916. // with awserr.Error's Code and Message methods to get detailed information about
  917. // the error.
  918. //
  919. // See the AWS API reference guide for AWS Certificate Manager Private Certificate Authority's
  920. // API operation IssueCertificate for usage and error information.
  921. //
  922. // Returned Error Codes:
  923. // * ErrCodeLimitExceededException "LimitExceededException"
  924. // An ACM PCA limit has been exceeded. See the exception message returned to
  925. // determine the limit that was exceeded.
  926. //
  927. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  928. // A resource such as a private CA, S3 bucket, certificate, or audit report
  929. // cannot be found.
  930. //
  931. // * ErrCodeInvalidStateException "InvalidStateException"
  932. // The private CA is in a state during which a report or certificate cannot
  933. // be generated.
  934. //
  935. // * ErrCodeInvalidArnException "InvalidArnException"
  936. // The requested Amazon Resource Name (ARN) does not refer to an existing resource.
  937. //
  938. // * ErrCodeInvalidArgsException "InvalidArgsException"
  939. // One or more of the specified arguments was not valid.
  940. //
  941. // * ErrCodeMalformedCSRException "MalformedCSRException"
  942. // The certificate signing request is invalid.
  943. //
  944. // See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/IssueCertificate
  945. func (c *ACMPCA) IssueCertificate(input *IssueCertificateInput) (*IssueCertificateOutput, error) {
  946. req, out := c.IssueCertificateRequest(input)
  947. return out, req.Send()
  948. }
  949. // IssueCertificateWithContext is the same as IssueCertificate with the addition of
  950. // the ability to pass a context and additional request options.
  951. //
  952. // See IssueCertificate for details on how to use this API operation.
  953. //
  954. // The context must be non-nil and will be used for request cancellation. If
  955. // the context is nil a panic will occur. In the future the SDK may create
  956. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  957. // for more information on using Contexts.
  958. func (c *ACMPCA) IssueCertificateWithContext(ctx aws.Context, input *IssueCertificateInput, opts ...request.Option) (*IssueCertificateOutput, error) {
  959. req, out := c.IssueCertificateRequest(input)
  960. req.SetContext(ctx)
  961. req.ApplyOptions(opts...)
  962. return out, req.Send()
  963. }
  964. const opListCertificateAuthorities = "ListCertificateAuthorities"
  965. // ListCertificateAuthoritiesRequest generates a "aws/request.Request" representing the
  966. // client's request for the ListCertificateAuthorities operation. The "output" return
  967. // value will be populated with the request's response once the request completes
  968. // successfully.
  969. //
  970. // Use "Send" method on the returned Request to send the API call to the service.
  971. // the "output" return value is not valid until after Send returns without error.
  972. //
  973. // See ListCertificateAuthorities for more information on using the ListCertificateAuthorities
  974. // API call, and error handling.
  975. //
  976. // This method is useful when you want to inject custom logic or configuration
  977. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  978. //
  979. //
  980. // // Example sending a request using the ListCertificateAuthoritiesRequest method.
  981. // req, resp := client.ListCertificateAuthoritiesRequest(params)
  982. //
  983. // err := req.Send()
  984. // if err == nil { // resp is now filled
  985. // fmt.Println(resp)
  986. // }
  987. //
  988. // See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/ListCertificateAuthorities
  989. func (c *ACMPCA) ListCertificateAuthoritiesRequest(input *ListCertificateAuthoritiesInput) (req *request.Request, output *ListCertificateAuthoritiesOutput) {
  990. op := &request.Operation{
  991. Name: opListCertificateAuthorities,
  992. HTTPMethod: "POST",
  993. HTTPPath: "/",
  994. Paginator: &request.Paginator{
  995. InputTokens: []string{"NextToken"},
  996. OutputTokens: []string{"NextToken"},
  997. LimitToken: "MaxResults",
  998. TruncationToken: "",
  999. },
  1000. }
  1001. if input == nil {
  1002. input = &ListCertificateAuthoritiesInput{}
  1003. }
  1004. output = &ListCertificateAuthoritiesOutput{}
  1005. req = c.newRequest(op, input, output)
  1006. return
  1007. }
  1008. // ListCertificateAuthorities API operation for AWS Certificate Manager Private Certificate Authority.
  1009. //
  1010. // Lists the private certificate authorities that you created by using the CreateCertificateAuthority
  1011. // operation.
  1012. //
  1013. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1014. // with awserr.Error's Code and Message methods to get detailed information about
  1015. // the error.
  1016. //
  1017. // See the AWS API reference guide for AWS Certificate Manager Private Certificate Authority's
  1018. // API operation ListCertificateAuthorities for usage and error information.
  1019. //
  1020. // Returned Error Codes:
  1021. // * ErrCodeInvalidNextTokenException "InvalidNextTokenException"
  1022. // The token specified in the NextToken argument is not valid. Use the token
  1023. // returned from your previous call to ListCertificateAuthorities.
  1024. //
  1025. // See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/ListCertificateAuthorities
  1026. func (c *ACMPCA) ListCertificateAuthorities(input *ListCertificateAuthoritiesInput) (*ListCertificateAuthoritiesOutput, error) {
  1027. req, out := c.ListCertificateAuthoritiesRequest(input)
  1028. return out, req.Send()
  1029. }
  1030. // ListCertificateAuthoritiesWithContext is the same as ListCertificateAuthorities with the addition of
  1031. // the ability to pass a context and additional request options.
  1032. //
  1033. // See ListCertificateAuthorities for details on how to use this API operation.
  1034. //
  1035. // The context must be non-nil and will be used for request cancellation. If
  1036. // the context is nil a panic will occur. In the future the SDK may create
  1037. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1038. // for more information on using Contexts.
  1039. func (c *ACMPCA) ListCertificateAuthoritiesWithContext(ctx aws.Context, input *ListCertificateAuthoritiesInput, opts ...request.Option) (*ListCertificateAuthoritiesOutput, error) {
  1040. req, out := c.ListCertificateAuthoritiesRequest(input)
  1041. req.SetContext(ctx)
  1042. req.ApplyOptions(opts...)
  1043. return out, req.Send()
  1044. }
  1045. // ListCertificateAuthoritiesPages iterates over the pages of a ListCertificateAuthorities operation,
  1046. // calling the "fn" function with the response data for each page. To stop
  1047. // iterating, return false from the fn function.
  1048. //
  1049. // See ListCertificateAuthorities method for more information on how to use this operation.
  1050. //
  1051. // Note: This operation can generate multiple requests to a service.
  1052. //
  1053. // // Example iterating over at most 3 pages of a ListCertificateAuthorities operation.
  1054. // pageNum := 0
  1055. // err := client.ListCertificateAuthoritiesPages(params,
  1056. // func(page *ListCertificateAuthoritiesOutput, lastPage bool) bool {
  1057. // pageNum++
  1058. // fmt.Println(page)
  1059. // return pageNum <= 3
  1060. // })
  1061. //
  1062. func (c *ACMPCA) ListCertificateAuthoritiesPages(input *ListCertificateAuthoritiesInput, fn func(*ListCertificateAuthoritiesOutput, bool) bool) error {
  1063. return c.ListCertificateAuthoritiesPagesWithContext(aws.BackgroundContext(), input, fn)
  1064. }
  1065. // ListCertificateAuthoritiesPagesWithContext same as ListCertificateAuthoritiesPages except
  1066. // it takes a Context and allows setting request options on the pages.
  1067. //
  1068. // The context must be non-nil and will be used for request cancellation. If
  1069. // the context is nil a panic will occur. In the future the SDK may create
  1070. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1071. // for more information on using Contexts.
  1072. func (c *ACMPCA) ListCertificateAuthoritiesPagesWithContext(ctx aws.Context, input *ListCertificateAuthoritiesInput, fn func(*ListCertificateAuthoritiesOutput, bool) bool, opts ...request.Option) error {
  1073. p := request.Pagination{
  1074. NewRequest: func() (*request.Request, error) {
  1075. var inCpy *ListCertificateAuthoritiesInput
  1076. if input != nil {
  1077. tmp := *input
  1078. inCpy = &tmp
  1079. }
  1080. req, _ := c.ListCertificateAuthoritiesRequest(inCpy)
  1081. req.SetContext(ctx)
  1082. req.ApplyOptions(opts...)
  1083. return req, nil
  1084. },
  1085. }
  1086. cont := true
  1087. for p.Next() && cont {
  1088. cont = fn(p.Page().(*ListCertificateAuthoritiesOutput), !p.HasNextPage())
  1089. }
  1090. return p.Err()
  1091. }
  1092. const opListTags = "ListTags"
  1093. // ListTagsRequest generates a "aws/request.Request" representing the
  1094. // client's request for the ListTags operation. The "output" return
  1095. // value will be populated with the request's response once the request completes
  1096. // successfully.
  1097. //
  1098. // Use "Send" method on the returned Request to send the API call to the service.
  1099. // the "output" return value is not valid until after Send returns without error.
  1100. //
  1101. // See ListTags for more information on using the ListTags
  1102. // API call, and error handling.
  1103. //
  1104. // This method is useful when you want to inject custom logic or configuration
  1105. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1106. //
  1107. //
  1108. // // Example sending a request using the ListTagsRequest method.
  1109. // req, resp := client.ListTagsRequest(params)
  1110. //
  1111. // err := req.Send()
  1112. // if err == nil { // resp is now filled
  1113. // fmt.Println(resp)
  1114. // }
  1115. //
  1116. // See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/ListTags
  1117. func (c *ACMPCA) ListTagsRequest(input *ListTagsInput) (req *request.Request, output *ListTagsOutput) {
  1118. op := &request.Operation{
  1119. Name: opListTags,
  1120. HTTPMethod: "POST",
  1121. HTTPPath: "/",
  1122. }
  1123. if input == nil {
  1124. input = &ListTagsInput{}
  1125. }
  1126. output = &ListTagsOutput{}
  1127. req = c.newRequest(op, input, output)
  1128. return
  1129. }
  1130. // ListTags API operation for AWS Certificate Manager Private Certificate Authority.
  1131. //
  1132. // Lists the tags, if any, that are associated with your private CA. Tags are
  1133. // labels that you can use to identify and organize your CAs. Each tag consists
  1134. // of a key and an optional value. Call the TagCertificateAuthority operation
  1135. // to add one or more tags to your CA. Call the UntagCertificateAuthority operation
  1136. // to remove tags.
  1137. //
  1138. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1139. // with awserr.Error's Code and Message methods to get detailed information about
  1140. // the error.
  1141. //
  1142. // See the AWS API reference guide for AWS Certificate Manager Private Certificate Authority's
  1143. // API operation ListTags for usage and error information.
  1144. //
  1145. // Returned Error Codes:
  1146. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1147. // A resource such as a private CA, S3 bucket, certificate, or audit report
  1148. // cannot be found.
  1149. //
  1150. // * ErrCodeInvalidArnException "InvalidArnException"
  1151. // The requested Amazon Resource Name (ARN) does not refer to an existing resource.
  1152. //
  1153. // See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/ListTags
  1154. func (c *ACMPCA) ListTags(input *ListTagsInput) (*ListTagsOutput, error) {
  1155. req, out := c.ListTagsRequest(input)
  1156. return out, req.Send()
  1157. }
  1158. // ListTagsWithContext is the same as ListTags with the addition of
  1159. // the ability to pass a context and additional request options.
  1160. //
  1161. // See ListTags for details on how to use this API operation.
  1162. //
  1163. // The context must be non-nil and will be used for request cancellation. If
  1164. // the context is nil a panic will occur. In the future the SDK may create
  1165. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1166. // for more information on using Contexts.
  1167. func (c *ACMPCA) ListTagsWithContext(ctx aws.Context, input *ListTagsInput, opts ...request.Option) (*ListTagsOutput, error) {
  1168. req, out := c.ListTagsRequest(input)
  1169. req.SetContext(ctx)
  1170. req.ApplyOptions(opts...)
  1171. return out, req.Send()
  1172. }
  1173. const opRestoreCertificateAuthority = "RestoreCertificateAuthority"
  1174. // RestoreCertificateAuthorityRequest generates a "aws/request.Request" representing the
  1175. // client's request for the RestoreCertificateAuthority operation. The "output" return
  1176. // value will be populated with the request's response once the request completes
  1177. // successfully.
  1178. //
  1179. // Use "Send" method on the returned Request to send the API call to the service.
  1180. // the "output" return value is not valid until after Send returns without error.
  1181. //
  1182. // See RestoreCertificateAuthority for more information on using the RestoreCertificateAuthority
  1183. // API call, and error handling.
  1184. //
  1185. // This method is useful when you want to inject custom logic or configuration
  1186. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1187. //
  1188. //
  1189. // // Example sending a request using the RestoreCertificateAuthorityRequest method.
  1190. // req, resp := client.RestoreCertificateAuthorityRequest(params)
  1191. //
  1192. // err := req.Send()
  1193. // if err == nil { // resp is now filled
  1194. // fmt.Println(resp)
  1195. // }
  1196. //
  1197. // See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/RestoreCertificateAuthority
  1198. func (c *ACMPCA) RestoreCertificateAuthorityRequest(input *RestoreCertificateAuthorityInput) (req *request.Request, output *RestoreCertificateAuthorityOutput) {
  1199. op := &request.Operation{
  1200. Name: opRestoreCertificateAuthority,
  1201. HTTPMethod: "POST",
  1202. HTTPPath: "/",
  1203. }
  1204. if input == nil {
  1205. input = &RestoreCertificateAuthorityInput{}
  1206. }
  1207. output = &RestoreCertificateAuthorityOutput{}
  1208. req = c.newRequest(op, input, output)
  1209. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1210. return
  1211. }
  1212. // RestoreCertificateAuthority API operation for AWS Certificate Manager Private Certificate Authority.
  1213. //
  1214. // Restores a certificate authority (CA) that is in the DELETED state. You can
  1215. // restore a CA during the period that you defined in the PermanentDeletionTimeInDays
  1216. // parameter of the DeleteCertificateAuthority operation. Currently, you can
  1217. // specify 7 to 30 days. If you did not specify a PermanentDeletionTimeInDays
  1218. // value, by default you can restore the CA at any time in a 30 day period.
  1219. // You can check the time remaining in the restoration period of a private CA
  1220. // in the DELETED state by calling the DescribeCertificateAuthority or ListCertificateAuthorities
  1221. // operations. The status of a restored CA is set to its pre-deletion status
  1222. // when the RestoreCertificateAuthority operation returns. To change its status
  1223. // to ACTIVE, call the UpdateCertificateAuthority operation. If the private
  1224. // CA was in the PENDING_CERTIFICATE state at deletion, you must use the ImportCertificateAuthorityCertificate
  1225. // operation to import a certificate authority into the private CA before it
  1226. // can be activated. You cannot restore a CA after the restoration period has
  1227. // ended.
  1228. //
  1229. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1230. // with awserr.Error's Code and Message methods to get detailed information about
  1231. // the error.
  1232. //
  1233. // See the AWS API reference guide for AWS Certificate Manager Private Certificate Authority's
  1234. // API operation RestoreCertificateAuthority for usage and error information.
  1235. //
  1236. // Returned Error Codes:
  1237. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1238. // A resource such as a private CA, S3 bucket, certificate, or audit report
  1239. // cannot be found.
  1240. //
  1241. // * ErrCodeInvalidStateException "InvalidStateException"
  1242. // The private CA is in a state during which a report or certificate cannot
  1243. // be generated.
  1244. //
  1245. // * ErrCodeInvalidArnException "InvalidArnException"
  1246. // The requested Amazon Resource Name (ARN) does not refer to an existing resource.
  1247. //
  1248. // See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/RestoreCertificateAuthority
  1249. func (c *ACMPCA) RestoreCertificateAuthority(input *RestoreCertificateAuthorityInput) (*RestoreCertificateAuthorityOutput, error) {
  1250. req, out := c.RestoreCertificateAuthorityRequest(input)
  1251. return out, req.Send()
  1252. }
  1253. // RestoreCertificateAuthorityWithContext is the same as RestoreCertificateAuthority with the addition of
  1254. // the ability to pass a context and additional request options.
  1255. //
  1256. // See RestoreCertificateAuthority for details on how to use this API operation.
  1257. //
  1258. // The context must be non-nil and will be used for request cancellation. If
  1259. // the context is nil a panic will occur. In the future the SDK may create
  1260. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1261. // for more information on using Contexts.
  1262. func (c *ACMPCA) RestoreCertificateAuthorityWithContext(ctx aws.Context, input *RestoreCertificateAuthorityInput, opts ...request.Option) (*RestoreCertificateAuthorityOutput, error) {
  1263. req, out := c.RestoreCertificateAuthorityRequest(input)
  1264. req.SetContext(ctx)
  1265. req.ApplyOptions(opts...)
  1266. return out, req.Send()
  1267. }
  1268. const opRevokeCertificate = "RevokeCertificate"
  1269. // RevokeCertificateRequest generates a "aws/request.Request" representing the
  1270. // client's request for the RevokeCertificate operation. The "output" return
  1271. // value will be populated with the request's response once the request completes
  1272. // successfully.
  1273. //
  1274. // Use "Send" method on the returned Request to send the API call to the service.
  1275. // the "output" return value is not valid until after Send returns without error.
  1276. //
  1277. // See RevokeCertificate for more information on using the RevokeCertificate
  1278. // API call, and error handling.
  1279. //
  1280. // This method is useful when you want to inject custom logic or configuration
  1281. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1282. //
  1283. //
  1284. // // Example sending a request using the RevokeCertificateRequest method.
  1285. // req, resp := client.RevokeCertificateRequest(params)
  1286. //
  1287. // err := req.Send()
  1288. // if err == nil { // resp is now filled
  1289. // fmt.Println(resp)
  1290. // }
  1291. //
  1292. // See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/RevokeCertificate
  1293. func (c *ACMPCA) RevokeCertificateRequest(input *RevokeCertificateInput) (req *request.Request, output *RevokeCertificateOutput) {
  1294. op := &request.Operation{
  1295. Name: opRevokeCertificate,
  1296. HTTPMethod: "POST",
  1297. HTTPPath: "/",
  1298. }
  1299. if input == nil {
  1300. input = &RevokeCertificateInput{}
  1301. }
  1302. output = &RevokeCertificateOutput{}
  1303. req = c.newRequest(op, input, output)
  1304. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1305. return
  1306. }
  1307. // RevokeCertificate API operation for AWS Certificate Manager Private Certificate Authority.
  1308. //
  1309. // Revokes a certificate that you issued by calling the IssueCertificate operation.
  1310. // If you enable a certificate revocation list (CRL) when you create or update
  1311. // your private CA, information about the revoked certificates will be included
  1312. // in the CRL. ACM PCA writes the CRL to an S3 bucket that you specify. For
  1313. // more information about revocation, see the CrlConfiguration structure. ACM
  1314. // PCA also writes revocation information to the audit report. For more information,
  1315. // see CreateCertificateAuthorityAuditReport.
  1316. //
  1317. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1318. // with awserr.Error's Code and Message methods to get detailed information about
  1319. // the error.
  1320. //
  1321. // See the AWS API reference guide for AWS Certificate Manager Private Certificate Authority's
  1322. // API operation RevokeCertificate for usage and error information.
  1323. //
  1324. // Returned Error Codes:
  1325. // * ErrCodeConcurrentModificationException "ConcurrentModificationException"
  1326. // A previous update to your private CA is still ongoing.
  1327. //
  1328. // * ErrCodeInvalidArnException "InvalidArnException"
  1329. // The requested Amazon Resource Name (ARN) does not refer to an existing resource.
  1330. //
  1331. // * ErrCodeInvalidStateException "InvalidStateException"
  1332. // The private CA is in a state during which a report or certificate cannot
  1333. // be generated.
  1334. //
  1335. // * ErrCodeLimitExceededException "LimitExceededException"
  1336. // An ACM PCA limit has been exceeded. See the exception message returned to
  1337. // determine the limit that was exceeded.
  1338. //
  1339. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1340. // A resource such as a private CA, S3 bucket, certificate, or audit report
  1341. // cannot be found.
  1342. //
  1343. // * ErrCodeRequestAlreadyProcessedException "RequestAlreadyProcessedException"
  1344. // Your request has already been completed.
  1345. //
  1346. // * ErrCodeRequestInProgressException "RequestInProgressException"
  1347. // Your request is already in progress.
  1348. //
  1349. // * ErrCodeRequestFailedException "RequestFailedException"
  1350. // The request has failed for an unspecified reason.
  1351. //
  1352. // See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/RevokeCertificate
  1353. func (c *ACMPCA) RevokeCertificate(input *RevokeCertificateInput) (*RevokeCertificateOutput, error) {
  1354. req, out := c.RevokeCertificateRequest(input)
  1355. return out, req.Send()
  1356. }
  1357. // RevokeCertificateWithContext is the same as RevokeCertificate with the addition of
  1358. // the ability to pass a context and additional request options.
  1359. //
  1360. // See RevokeCertificate for details on how to use this API operation.
  1361. //
  1362. // The context must be non-nil and will be used for request cancellation. If
  1363. // the context is nil a panic will occur. In the future the SDK may create
  1364. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1365. // for more information on using Contexts.
  1366. func (c *ACMPCA) RevokeCertificateWithContext(ctx aws.Context, input *RevokeCertificateInput, opts ...request.Option) (*RevokeCertificateOutput, error) {
  1367. req, out := c.RevokeCertificateRequest(input)
  1368. req.SetContext(ctx)
  1369. req.ApplyOptions(opts...)
  1370. return out, req.Send()
  1371. }
  1372. const opTagCertificateAuthority = "TagCertificateAuthority"
  1373. // TagCertificateAuthorityRequest generates a "aws/request.Request" representing the
  1374. // client's request for the TagCertificateAuthority operation. The "output" return
  1375. // value will be populated with the request's response once the request completes
  1376. // successfully.
  1377. //
  1378. // Use "Send" method on the returned Request to send the API call to the service.
  1379. // the "output" return value is not valid until after Send returns without error.
  1380. //
  1381. // See TagCertificateAuthority for more information on using the TagCertificateAuthority
  1382. // API call, and error handling.
  1383. //
  1384. // This method is useful when you want to inject custom logic or configuration
  1385. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1386. //
  1387. //
  1388. // // Example sending a request using the TagCertificateAuthorityRequest method.
  1389. // req, resp := client.TagCertificateAuthorityRequest(params)
  1390. //
  1391. // err := req.Send()
  1392. // if err == nil { // resp is now filled
  1393. // fmt.Println(resp)
  1394. // }
  1395. //
  1396. // See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/TagCertificateAuthority
  1397. func (c *ACMPCA) TagCertificateAuthorityRequest(input *TagCertificateAuthorityInput) (req *request.Request, output *TagCertificateAuthorityOutput) {
  1398. op := &request.Operation{
  1399. Name: opTagCertificateAuthority,
  1400. HTTPMethod: "POST",
  1401. HTTPPath: "/",
  1402. }
  1403. if input == nil {
  1404. input = &TagCertificateAuthorityInput{}
  1405. }
  1406. output = &TagCertificateAuthorityOutput{}
  1407. req = c.newRequest(op, input, output)
  1408. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1409. return
  1410. }
  1411. // TagCertificateAuthority API operation for AWS Certificate Manager Private Certificate Authority.
  1412. //
  1413. // Adds one or more tags to your private CA. Tags are labels that you can use
  1414. // to identify and organize your AWS resources. Each tag consists of a key and
  1415. // an optional value. You specify the private CA on input by its Amazon Resource
  1416. // Name (ARN). You specify the tag by using a key-value pair. You can apply
  1417. // a tag to just one private CA if you want to identify a specific characteristic
  1418. // of that CA, or you can apply the same tag to multiple private CAs if you
  1419. // want to filter for a common relationship among those CAs. To remove one or
  1420. // more tags, use the UntagCertificateAuthority operation. Call the ListTags
  1421. // operation to see what tags are associated with your CA.
  1422. //
  1423. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1424. // with awserr.Error's Code and Message methods to get detailed information about
  1425. // the error.
  1426. //
  1427. // See the AWS API reference guide for AWS Certificate Manager Private Certificate Authority's
  1428. // API operation TagCertificateAuthority for usage and error information.
  1429. //
  1430. // Returned Error Codes:
  1431. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1432. // A resource such as a private CA, S3 bucket, certificate, or audit report
  1433. // cannot be found.
  1434. //
  1435. // * ErrCodeInvalidArnException "InvalidArnException"
  1436. // The requested Amazon Resource Name (ARN) does not refer to an existing resource.
  1437. //
  1438. // * ErrCodeInvalidStateException "InvalidStateException"
  1439. // The private CA is in a state during which a report or certificate cannot
  1440. // be generated.
  1441. //
  1442. // * ErrCodeInvalidTagException "InvalidTagException"
  1443. // The tag associated with the CA is not valid. The invalid argument is contained
  1444. // in the message field.
  1445. //
  1446. // * ErrCodeTooManyTagsException "TooManyTagsException"
  1447. // You can associate up to 50 tags with a private CA. Exception information
  1448. // is contained in the exception message field.
  1449. //
  1450. // See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/TagCertificateAuthority
  1451. func (c *ACMPCA) TagCertificateAuthority(input *TagCertificateAuthorityInput) (*TagCertificateAuthorityOutput, error) {
  1452. req, out := c.TagCertificateAuthorityRequest(input)
  1453. return out, req.Send()
  1454. }
  1455. // TagCertificateAuthorityWithContext is the same as TagCertificateAuthority with the addition of
  1456. // the ability to pass a context and additional request options.
  1457. //
  1458. // See TagCertificateAuthority for details on how to use this API operation.
  1459. //
  1460. // The context must be non-nil and will be used for request cancellation. If
  1461. // the context is nil a panic will occur. In the future the SDK may create
  1462. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1463. // for more information on using Contexts.
  1464. func (c *ACMPCA) TagCertificateAuthorityWithContext(ctx aws.Context, input *TagCertificateAuthorityInput, opts ...request.Option) (*TagCertificateAuthorityOutput, error) {
  1465. req, out := c.TagCertificateAuthorityRequest(input)
  1466. req.SetContext(ctx)
  1467. req.ApplyOptions(opts...)
  1468. return out, req.Send()
  1469. }
  1470. const opUntagCertificateAuthority = "UntagCertificateAuthority"
  1471. // UntagCertificateAuthorityRequest generates a "aws/request.Request" representing the
  1472. // client's request for the UntagCertificateAuthority operation. The "output" return
  1473. // value will be populated with the request's response once the request completes
  1474. // successfully.
  1475. //
  1476. // Use "Send" method on the returned Request to send the API call to the service.
  1477. // the "output" return value is not valid until after Send returns without error.
  1478. //
  1479. // See UntagCertificateAuthority for more information on using the UntagCertificateAuthority
  1480. // API call, and error handling.
  1481. //
  1482. // This method is useful when you want to inject custom logic or configuration
  1483. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1484. //
  1485. //
  1486. // // Example sending a request using the UntagCertificateAuthorityRequest method.
  1487. // req, resp := client.UntagCertificateAuthorityRequest(params)
  1488. //
  1489. // err := req.Send()
  1490. // if err == nil { // resp is now filled
  1491. // fmt.Println(resp)
  1492. // }
  1493. //
  1494. // See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/UntagCertificateAuthority
  1495. func (c *ACMPCA) UntagCertificateAuthorityRequest(input *UntagCertificateAuthorityInput) (req *request.Request, output *UntagCertificateAuthorityOutput) {
  1496. op := &request.Operation{
  1497. Name: opUntagCertificateAuthority,
  1498. HTTPMethod: "POST",
  1499. HTTPPath: "/",
  1500. }
  1501. if input == nil {
  1502. input = &UntagCertificateAuthorityInput{}
  1503. }
  1504. output = &UntagCertificateAuthorityOutput{}
  1505. req = c.newRequest(op, input, output)
  1506. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1507. return
  1508. }
  1509. // UntagCertificateAuthority API operation for AWS Certificate Manager Private Certificate Authority.
  1510. //
  1511. // Remove one or more tags from your private CA. A tag consists of a key-value
  1512. // pair. If you do not specify the value portion of the tag when calling this
  1513. // operation, the tag will be removed regardless of value. If you specify a
  1514. // value, the tag is removed only if it is associated with the specified value.
  1515. // To add tags to a private CA, use the TagCertificateAuthority. Call the ListTags
  1516. // operation to see what tags are associated with your CA.
  1517. //
  1518. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1519. // with awserr.Error's Code and Message methods to get detailed information about
  1520. // the error.
  1521. //
  1522. // See the AWS API reference guide for AWS Certificate Manager Private Certificate Authority's
  1523. // API operation UntagCertificateAuthority for usage and error information.
  1524. //
  1525. // Returned Error Codes:
  1526. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1527. // A resource such as a private CA, S3 bucket, certificate, or audit report
  1528. // cannot be found.
  1529. //
  1530. // * ErrCodeInvalidArnException "InvalidArnException"
  1531. // The requested Amazon Resource Name (ARN) does not refer to an existing resource.
  1532. //
  1533. // * ErrCodeInvalidStateException "InvalidStateException"
  1534. // The private CA is in a state during which a report or certificate cannot
  1535. // be generated.
  1536. //
  1537. // * ErrCodeInvalidTagException "InvalidTagException"
  1538. // The tag associated with the CA is not valid. The invalid argument is contained
  1539. // in the message field.
  1540. //
  1541. // See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/UntagCertificateAuthority
  1542. func (c *ACMPCA) UntagCertificateAuthority(input *UntagCertificateAuthorityInput) (*UntagCertificateAuthorityOutput, error) {
  1543. req, out := c.UntagCertificateAuthorityRequest(input)
  1544. return out, req.Send()
  1545. }
  1546. // UntagCertificateAuthorityWithContext is the same as UntagCertificateAuthority with the addition of
  1547. // the ability to pass a context and additional request options.
  1548. //
  1549. // See UntagCertificateAuthority for details on how to use this API operation.
  1550. //
  1551. // The context must be non-nil and will be used for request cancellation. If
  1552. // the context is nil a panic will occur. In the future the SDK may create
  1553. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1554. // for more information on using Contexts.
  1555. func (c *ACMPCA) UntagCertificateAuthorityWithContext(ctx aws.Context, input *UntagCertificateAuthorityInput, opts ...request.Option) (*UntagCertificateAuthorityOutput, error) {
  1556. req, out := c.UntagCertificateAuthorityRequest(input)
  1557. req.SetContext(ctx)
  1558. req.ApplyOptions(opts...)
  1559. return out, req.Send()
  1560. }
  1561. const opUpdateCertificateAuthority = "UpdateCertificateAuthority"
  1562. // UpdateCertificateAuthorityRequest generates a "aws/request.Request" representing the
  1563. // client's request for the UpdateCertificateAuthority operation. The "output" return
  1564. // value will be populated with the request's response once the request completes
  1565. // successfully.
  1566. //
  1567. // Use "Send" method on the returned Request to send the API call to the service.
  1568. // the "output" return value is not valid until after Send returns without error.
  1569. //
  1570. // See UpdateCertificateAuthority for more information on using the UpdateCertificateAuthority
  1571. // API call, and error handling.
  1572. //
  1573. // This method is useful when you want to inject custom logic or configuration
  1574. // into the SDK's request lifecycle. Such as custom headers, or retry logic.
  1575. //
  1576. //
  1577. // // Example sending a request using the UpdateCertificateAuthorityRequest method.
  1578. // req, resp := client.UpdateCertificateAuthorityRequest(params)
  1579. //
  1580. // err := req.Send()
  1581. // if err == nil { // resp is now filled
  1582. // fmt.Println(resp)
  1583. // }
  1584. //
  1585. // See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/UpdateCertificateAuthority
  1586. func (c *ACMPCA) UpdateCertificateAuthorityRequest(input *UpdateCertificateAuthorityInput) (req *request.Request, output *UpdateCertificateAuthorityOutput) {
  1587. op := &request.Operation{
  1588. Name: opUpdateCertificateAuthority,
  1589. HTTPMethod: "POST",
  1590. HTTPPath: "/",
  1591. }
  1592. if input == nil {
  1593. input = &UpdateCertificateAuthorityInput{}
  1594. }
  1595. output = &UpdateCertificateAuthorityOutput{}
  1596. req = c.newRequest(op, input, output)
  1597. req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
  1598. return
  1599. }
  1600. // UpdateCertificateAuthority API operation for AWS Certificate Manager Private Certificate Authority.
  1601. //
  1602. // Updates the status or configuration of a private certificate authority (CA).
  1603. // Your private CA must be in the ACTIVE or DISABLED state before you can update
  1604. // it. You can disable a private CA that is in the ACTIVE state or make a CA
  1605. // that is in the DISABLED state active again.
  1606. //
  1607. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1608. // with awserr.Error's Code and Message methods to get detailed information about
  1609. // the error.
  1610. //
  1611. // See the AWS API reference guide for AWS Certificate Manager Private Certificate Authority's
  1612. // API operation UpdateCertificateAuthority for usage and error information.
  1613. //
  1614. // Returned Error Codes:
  1615. // * ErrCodeConcurrentModificationException "ConcurrentModificationException"
  1616. // A previous update to your private CA is still ongoing.
  1617. //
  1618. // * ErrCodeResourceNotFoundException "ResourceNotFoundException"
  1619. // A resource such as a private CA, S3 bucket, certificate, or audit report
  1620. // cannot be found.
  1621. //
  1622. // * ErrCodeInvalidArgsException "InvalidArgsException"
  1623. // One or more of the specified arguments was not valid.
  1624. //
  1625. // * ErrCodeInvalidArnException "InvalidArnException"
  1626. // The requested Amazon Resource Name (ARN) does not refer to an existing resource.
  1627. //
  1628. // * ErrCodeInvalidStateException "InvalidStateException"
  1629. // The private CA is in a state during which a report or certificate cannot
  1630. // be generated.
  1631. //
  1632. // * ErrCodeInvalidPolicyException "InvalidPolicyException"
  1633. // The S3 bucket policy is not valid. The policy must give ACM PCA rights to
  1634. // read from and write to the bucket and find the bucket location.
  1635. //
  1636. // See also, https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/UpdateCertificateAuthority
  1637. func (c *ACMPCA) UpdateCertificateAuthority(input *UpdateCertificateAuthorityInput) (*UpdateCertificateAuthorityOutput, error) {
  1638. req, out := c.UpdateCertificateAuthorityRequest(input)
  1639. return out, req.Send()
  1640. }
  1641. // UpdateCertificateAuthorityWithContext is the same as UpdateCertificateAuthority with the addition of
  1642. // the ability to pass a context and additional request options.
  1643. //
  1644. // See UpdateCertificateAuthority for details on how to use this API operation.
  1645. //
  1646. // The context must be non-nil and will be used for request cancellation. If
  1647. // the context is nil a panic will occur. In the future the SDK may create
  1648. // sub-contexts for http.Requests. See https://golang.org/pkg/context/
  1649. // for more information on using Contexts.
  1650. func (c *ACMPCA) UpdateCertificateAuthorityWithContext(ctx aws.Context, input *UpdateCertificateAuthorityInput, opts ...request.Option) (*UpdateCertificateAuthorityOutput, error) {
  1651. req, out := c.UpdateCertificateAuthorityRequest(input)
  1652. req.SetContext(ctx)
  1653. req.ApplyOptions(opts...)
  1654. return out, req.Send()
  1655. }
  1656. // Contains information about the certificate subject. The certificate can be
  1657. // one issued by your private certificate authority (CA) or it can be your private
  1658. // CA certificate. The Subject field in the certificate identifies the entity
  1659. // that owns or controls the public key in the certificate. The entity can be
  1660. // a user, computer, device, or service. The Subject must contain an X.500 distinguished
  1661. // name (DN). A DN is a sequence of relative distinguished names (RDNs). The
  1662. // RDNs are separated by commas in the certificate. The DN must be unique for
  1663. // each entity, but your private CA can issue more than one certificate with
  1664. // the same DN to the same entity.
  1665. type ASN1Subject struct {
  1666. _ struct{} `type:"structure"`
  1667. // Fully qualified domain name (FQDN) associated with the certificate subject.
  1668. CommonName *string `type:"string"`
  1669. // Two-digit code that specifies the country in which the certificate subject
  1670. // located.
  1671. Country *string `type:"string"`
  1672. // Disambiguating information for the certificate subject.
  1673. DistinguishedNameQualifier *string `type:"string"`
  1674. // Typically a qualifier appended to the name of an individual. Examples include
  1675. // Jr. for junior, Sr. for senior, and III for third.
  1676. GenerationQualifier *string `type:"string"`
  1677. // First name.
  1678. GivenName *string `type:"string"`
  1679. // Concatenation that typically contains the first letter of the GivenName,
  1680. // the first letter of the middle name if one exists, and the first letter of
  1681. // the SurName.
  1682. Initials *string `type:"string"`
  1683. // The locality (such as a city or town) in which the certificate subject is
  1684. // located.
  1685. Locality *string `type:"string"`
  1686. // Legal name of the organization with which the certificate subject is affiliated.
  1687. Organization *string `type:"string"`
  1688. // A subdivision or unit of the organization (such as sales or finance) with
  1689. // which the certificate subject is affiliated.
  1690. OrganizationalUnit *string `type:"string"`
  1691. // Typically a shortened version of a longer GivenName. For example, Jonathan
  1692. // is often shortened to John. Elizabeth is often shortened to Beth, Liz, or
  1693. // Eliza.
  1694. Pseudonym *string `type:"string"`
  1695. // The certificate serial number.
  1696. SerialNumber *string `type:"string"`
  1697. // State in which the subject of the certificate is located.
  1698. State *string `type:"string"`
  1699. // Family name. In the US and the UK, for example, the surname of an individual
  1700. // is ordered last. In Asian cultures the surname is typically ordered first.
  1701. Surname *string `type:"string"`
  1702. // A title such as Mr. or Ms., which is pre-pended to the name to refer formally
  1703. // to the certificate subject.
  1704. Title *string `type:"string"`
  1705. }
  1706. // String returns the string representation
  1707. func (s ASN1Subject) String() string {
  1708. return awsutil.Prettify(s)
  1709. }
  1710. // GoString returns the string representation
  1711. func (s ASN1Subject) GoString() string {
  1712. return s.String()
  1713. }
  1714. // SetCommonName sets the CommonName field's value.
  1715. func (s *ASN1Subject) SetCommonName(v string) *ASN1Subject {
  1716. s.CommonName = &v
  1717. return s
  1718. }
  1719. // SetCountry sets the Country field's value.
  1720. func (s *ASN1Subject) SetCountry(v string) *ASN1Subject {
  1721. s.Country = &v
  1722. return s
  1723. }
  1724. // SetDistinguishedNameQualifier sets the DistinguishedNameQualifier field's value.
  1725. func (s *ASN1Subject) SetDistinguishedNameQualifier(v string) *ASN1Subject {
  1726. s.DistinguishedNameQualifier = &v
  1727. return s
  1728. }
  1729. // SetGenerationQualifier sets the GenerationQualifier field's value.
  1730. func (s *ASN1Subject) SetGenerationQualifier(v string) *ASN1Subject {
  1731. s.GenerationQualifier = &v
  1732. return s
  1733. }
  1734. // SetGivenName sets the GivenName field's value.
  1735. func (s *ASN1Subject) SetGivenName(v string) *ASN1Subject {
  1736. s.GivenName = &v
  1737. return s
  1738. }
  1739. // SetInitials sets the Initials field's value.
  1740. func (s *ASN1Subject) SetInitials(v string) *ASN1Subject {
  1741. s.Initials = &v
  1742. return s
  1743. }
  1744. // SetLocality sets the Locality field's value.
  1745. func (s *ASN1Subject) SetLocality(v string) *ASN1Subject {
  1746. s.Locality = &v
  1747. return s
  1748. }
  1749. // SetOrganization sets the Organization field's value.
  1750. func (s *ASN1Subject) SetOrganization(v string) *ASN1Subject {
  1751. s.Organization = &v
  1752. return s
  1753. }
  1754. // SetOrganizationalUnit sets the OrganizationalUnit field's value.
  1755. func (s *ASN1Subject) SetOrganizationalUnit(v string) *ASN1Subject {
  1756. s.OrganizationalUnit = &v
  1757. return s
  1758. }
  1759. // SetPseudonym sets the Pseudonym field's value.
  1760. func (s *ASN1Subject) SetPseudonym(v string) *ASN1Subject {
  1761. s.Pseudonym = &v
  1762. return s
  1763. }
  1764. // SetSerialNumber sets the SerialNumber field's value.
  1765. func (s *ASN1Subject) SetSerialNumber(v string) *ASN1Subject {
  1766. s.SerialNumber = &v
  1767. return s
  1768. }
  1769. // SetState sets the State field's value.
  1770. func (s *ASN1Subject) SetState(v string) *ASN1Subject {
  1771. s.State = &v
  1772. return s
  1773. }
  1774. // SetSurname sets the Surname field's value.
  1775. func (s *ASN1Subject) SetSurname(v string) *ASN1Subject {
  1776. s.Surname = &v
  1777. return s
  1778. }
  1779. // SetTitle sets the Title field's value.
  1780. func (s *ASN1Subject) SetTitle(v string) *ASN1Subject {
  1781. s.Title = &v
  1782. return s
  1783. }
  1784. // Contains information about your private certificate authority (CA). Your
  1785. // private CA can issue and revoke X.509 digital certificates. Digital certificates
  1786. // verify that the entity named in the certificate Subject field owns or controls
  1787. // the public key contained in the Subject Public Key Info field. Call the CreateCertificateAuthority
  1788. // operation to create your private CA. You must then call the GetCertificateAuthorityCertificate
  1789. // operation to retrieve a private CA certificate signing request (CSR). Take
  1790. // the CSR to your on-premises CA and sign it with the root CA certificate or
  1791. // a subordinate certificate. Call the ImportCertificateAuthorityCertificate
  1792. // operation to import the signed certificate into AWS Certificate Manager (ACM).
  1793. type CertificateAuthority struct {
  1794. _ struct{} `type:"structure"`
  1795. // Amazon Resource Name (ARN) for your private certificate authority (CA). The
  1796. // format is 12345678-1234-1234-1234-123456789012.
  1797. Arn *string `min:"5" type:"string"`
  1798. // Your private CA configuration.
  1799. CertificateAuthorityConfiguration *CertificateAuthorityConfiguration `type:"structure"`
  1800. // Date and time at which your private CA was created.
  1801. CreatedAt *time.Time `type:"timestamp"`
  1802. // Reason the request to create your private CA failed.
  1803. FailureReason *string `type:"string" enum:"FailureReason"`
  1804. // Date and time at which your private CA was last updated.
  1805. LastStateChangeAt *time.Time `type:"timestamp"`
  1806. // Date and time after which your private CA certificate is not valid.
  1807. NotAfter *time.Time `type:"timestamp"`
  1808. // Date and time before which your private CA certificate is not valid.
  1809. NotBefore *time.Time `type:"timestamp"`
  1810. // The period during which a deleted CA can be restored. For more information,
  1811. // see the PermanentDeletionTimeInDays parameter of the DeleteCertificateAuthorityRequest
  1812. // operation.
  1813. RestorableUntil *time.Time `type:"timestamp"`
  1814. // Information about the certificate revocation list (CRL) created and maintained
  1815. // by your private CA.
  1816. RevocationConfiguration *RevocationConfiguration `type:"structure"`
  1817. // Serial number of your private CA.
  1818. Serial *string `type:"string"`
  1819. // Status of your private CA.
  1820. Status *string `type:"string" enum:"CertificateAuthorityStatus"`
  1821. // Type of your private CA.
  1822. Type *string `type:"string" enum:"CertificateAuthorityType"`
  1823. }
  1824. // String returns the string representation
  1825. func (s CertificateAuthority) String() string {
  1826. return awsutil.Prettify(s)
  1827. }
  1828. // GoString returns the string representation
  1829. func (s CertificateAuthority) GoString() string {
  1830. return s.String()
  1831. }
  1832. // SetArn sets the Arn field's value.
  1833. func (s *CertificateAuthority) SetArn(v string) *CertificateAuthority {
  1834. s.Arn = &v
  1835. return s
  1836. }
  1837. // SetCertificateAuthorityConfiguration sets the CertificateAuthorityConfiguration field's value.
  1838. func (s *CertificateAuthority) SetCertificateAuthorityConfiguration(v *CertificateAuthorityConfiguration) *CertificateAuthority {
  1839. s.CertificateAuthorityConfiguration = v
  1840. return s
  1841. }
  1842. // SetCreatedAt sets the CreatedAt field's value.
  1843. func (s *CertificateAuthority) SetCreatedAt(v time.Time) *CertificateAuthority {
  1844. s.CreatedAt = &v
  1845. return s
  1846. }
  1847. // SetFailureReason sets the FailureReason field's value.
  1848. func (s *CertificateAuthority) SetFailureReason(v string) *CertificateAuthority {
  1849. s.FailureReason = &v
  1850. return s
  1851. }
  1852. // SetLastStateChangeAt sets the LastStateChangeAt field's value.
  1853. func (s *CertificateAuthority) SetLastStateChangeAt(v time.Time) *CertificateAuthority {
  1854. s.LastStateChangeAt = &v
  1855. return s
  1856. }
  1857. // SetNotAfter sets the NotAfter field's value.
  1858. func (s *CertificateAuthority) SetNotAfter(v time.Time) *CertificateAuthority {
  1859. s.NotAfter = &v
  1860. return s
  1861. }
  1862. // SetNotBefore sets the NotBefore field's value.
  1863. func (s *CertificateAuthority) SetNotBefore(v time.Time) *CertificateAuthority {
  1864. s.NotBefore = &v
  1865. return s
  1866. }
  1867. // SetRestorableUntil sets the RestorableUntil field's value.
  1868. func (s *CertificateAuthority) SetRestorableUntil(v time.Time) *CertificateAuthority {
  1869. s.RestorableUntil = &v
  1870. return s
  1871. }
  1872. // SetRevocationConfiguration sets the RevocationConfiguration field's value.
  1873. func (s *CertificateAuthority) SetRevocationConfiguration(v *RevocationConfiguration) *CertificateAuthority {
  1874. s.RevocationConfiguration = v
  1875. return s
  1876. }
  1877. // SetSerial sets the Serial field's value.
  1878. func (s *CertificateAuthority) SetSerial(v string) *CertificateAuthority {
  1879. s.Serial = &v
  1880. return s
  1881. }
  1882. // SetStatus sets the Status field's value.
  1883. func (s *CertificateAuthority) SetStatus(v string) *CertificateAuthority {
  1884. s.Status = &v
  1885. return s
  1886. }
  1887. // SetType sets the Type field's value.
  1888. func (s *CertificateAuthority) SetType(v string) *CertificateAuthority {
  1889. s.Type = &v
  1890. return s
  1891. }
  1892. // Contains configuration information for your private certificate authority
  1893. // (CA). This includes information about the class of public key algorithm and
  1894. // the key pair that your private CA creates when it issues a certificate, the
  1895. // signature algorithm it uses used when issuing certificates, and its X.500
  1896. // distinguished name. You must specify this information when you call the CreateCertificateAuthority
  1897. // operation.
  1898. type CertificateAuthorityConfiguration struct {
  1899. _ struct{} `type:"structure"`
  1900. // Type of the public key algorithm and size, in bits, of the key pair that
  1901. // your key pair creates when it issues a certificate.
  1902. //
  1903. // KeyAlgorithm is a required field
  1904. KeyAlgorithm *string `type:"string" required:"true" enum:"KeyAlgorithm"`
  1905. // Name of the algorithm your private CA uses to sign certificate requests.
  1906. //
  1907. // SigningAlgorithm is a required field
  1908. SigningAlgorithm *string `type:"string" required:"true" enum:"SigningAlgorithm"`
  1909. // Structure that contains X.500 distinguished name information for your private
  1910. // CA.
  1911. //
  1912. // Subject is a required field
  1913. Subject *ASN1Subject `type:"structure" required:"true"`
  1914. }
  1915. // String returns the string representation
  1916. func (s CertificateAuthorityConfiguration) String() string {
  1917. return awsutil.Prettify(s)
  1918. }
  1919. // GoString returns the string representation
  1920. func (s CertificateAuthorityConfiguration) GoString() string {
  1921. return s.String()
  1922. }
  1923. // Validate inspects the fields of the type to determine if they are valid.
  1924. func (s *CertificateAuthorityConfiguration) Validate() error {
  1925. invalidParams := request.ErrInvalidParams{Context: "CertificateAuthorityConfiguration"}
  1926. if s.KeyAlgorithm == nil {
  1927. invalidParams.Add(request.NewErrParamRequired("KeyAlgorithm"))
  1928. }
  1929. if s.SigningAlgorithm == nil {
  1930. invalidParams.Add(request.NewErrParamRequired("SigningAlgorithm"))
  1931. }
  1932. if s.Subject == nil {
  1933. invalidParams.Add(request.NewErrParamRequired("Subject"))
  1934. }
  1935. if invalidParams.Len() > 0 {
  1936. return invalidParams
  1937. }
  1938. return nil
  1939. }
  1940. // SetKeyAlgorithm sets the KeyAlgorithm field's value.
  1941. func (s *CertificateAuthorityConfiguration) SetKeyAlgorithm(v string) *CertificateAuthorityConfiguration {
  1942. s.KeyAlgorithm = &v
  1943. return s
  1944. }
  1945. // SetSigningAlgorithm sets the SigningAlgorithm field's value.
  1946. func (s *CertificateAuthorityConfiguration) SetSigningAlgorithm(v string) *CertificateAuthorityConfiguration {
  1947. s.SigningAlgorithm = &v
  1948. return s
  1949. }
  1950. // SetSubject sets the Subject field's value.
  1951. func (s *CertificateAuthorityConfiguration) SetSubject(v *ASN1Subject) *CertificateAuthorityConfiguration {
  1952. s.Subject = v
  1953. return s
  1954. }
  1955. type CreateCertificateAuthorityAuditReportInput struct {
  1956. _ struct{} `type:"structure"`
  1957. // Format in which to create the report. This can be either JSON or CSV.
  1958. //
  1959. // AuditReportResponseFormat is a required field
  1960. AuditReportResponseFormat *string `type:"string" required:"true" enum:"AuditReportResponseFormat"`
  1961. // Amazon Resource Name (ARN) of the CA to be audited. This is of the form:
  1962. //
  1963. // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012.
  1964. //
  1965. // CertificateAuthorityArn is a required field
  1966. CertificateAuthorityArn *string `min:"5" type:"string" required:"true"`
  1967. // Name of the S3 bucket that will contain the audit report.
  1968. //
  1969. // S3BucketName is a required field
  1970. S3BucketName *string `type:"string" required:"true"`
  1971. }
  1972. // String returns the string representation
  1973. func (s CreateCertificateAuthorityAuditReportInput) String() string {
  1974. return awsutil.Prettify(s)
  1975. }
  1976. // GoString returns the string representation
  1977. func (s CreateCertificateAuthorityAuditReportInput) GoString() string {
  1978. return s.String()
  1979. }
  1980. // Validate inspects the fields of the type to determine if they are valid.
  1981. func (s *CreateCertificateAuthorityAuditReportInput) Validate() error {
  1982. invalidParams := request.ErrInvalidParams{Context: "CreateCertificateAuthorityAuditReportInput"}
  1983. if s.AuditReportResponseFormat == nil {
  1984. invalidParams.Add(request.NewErrParamRequired("AuditReportResponseFormat"))
  1985. }
  1986. if s.CertificateAuthorityArn == nil {
  1987. invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn"))
  1988. }
  1989. if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 {
  1990. invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5))
  1991. }
  1992. if s.S3BucketName == nil {
  1993. invalidParams.Add(request.NewErrParamRequired("S3BucketName"))
  1994. }
  1995. if invalidParams.Len() > 0 {
  1996. return invalidParams
  1997. }
  1998. return nil
  1999. }
  2000. // SetAuditReportResponseFormat sets the AuditReportResponseFormat field's value.
  2001. func (s *CreateCertificateAuthorityAuditReportInput) SetAuditReportResponseFormat(v string) *CreateCertificateAuthorityAuditReportInput {
  2002. s.AuditReportResponseFormat = &v
  2003. return s
  2004. }
  2005. // SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value.
  2006. func (s *CreateCertificateAuthorityAuditReportInput) SetCertificateAuthorityArn(v string) *CreateCertificateAuthorityAuditReportInput {
  2007. s.CertificateAuthorityArn = &v
  2008. return s
  2009. }
  2010. // SetS3BucketName sets the S3BucketName field's value.
  2011. func (s *CreateCertificateAuthorityAuditReportInput) SetS3BucketName(v string) *CreateCertificateAuthorityAuditReportInput {
  2012. s.S3BucketName = &v
  2013. return s
  2014. }
  2015. type CreateCertificateAuthorityAuditReportOutput struct {
  2016. _ struct{} `type:"structure"`
  2017. // An alphanumeric string that contains a report identifier.
  2018. AuditReportId *string `min:"36" type:"string"`
  2019. // The key that uniquely identifies the report file in your S3 bucket.
  2020. S3Key *string `type:"string"`
  2021. }
  2022. // String returns the string representation
  2023. func (s CreateCertificateAuthorityAuditReportOutput) String() string {
  2024. return awsutil.Prettify(s)
  2025. }
  2026. // GoString returns the string representation
  2027. func (s CreateCertificateAuthorityAuditReportOutput) GoString() string {
  2028. return s.String()
  2029. }
  2030. // SetAuditReportId sets the AuditReportId field's value.
  2031. func (s *CreateCertificateAuthorityAuditReportOutput) SetAuditReportId(v string) *CreateCertificateAuthorityAuditReportOutput {
  2032. s.AuditReportId = &v
  2033. return s
  2034. }
  2035. // SetS3Key sets the S3Key field's value.
  2036. func (s *CreateCertificateAuthorityAuditReportOutput) SetS3Key(v string) *CreateCertificateAuthorityAuditReportOutput {
  2037. s.S3Key = &v
  2038. return s
  2039. }
  2040. type CreateCertificateAuthorityInput struct {
  2041. _ struct{} `type:"structure"`
  2042. // Name and bit size of the private key algorithm, the name of the signing algorithm,
  2043. // and X.500 certificate subject information.
  2044. //
  2045. // CertificateAuthorityConfiguration is a required field
  2046. CertificateAuthorityConfiguration *CertificateAuthorityConfiguration `type:"structure" required:"true"`
  2047. // The type of the certificate authority. Currently, this must be SUBORDINATE.
  2048. //
  2049. // CertificateAuthorityType is a required field
  2050. CertificateAuthorityType *string `type:"string" required:"true" enum:"CertificateAuthorityType"`
  2051. // Alphanumeric string that can be used to distinguish between calls to CreateCertificateAuthority.
  2052. // Idempotency tokens time out after five minutes. Therefore, if you call CreateCertificateAuthority
  2053. // multiple times with the same idempotency token within a five minute period,
  2054. // ACM PCA recognizes that you are requesting only one certificate. As a result,
  2055. // ACM PCA issues only one. If you change the idempotency token for each call,
  2056. // however, ACM PCA recognizes that you are requesting multiple certificates.
  2057. IdempotencyToken *string `min:"1" type:"string"`
  2058. // Contains a Boolean value that you can use to enable a certification revocation
  2059. // list (CRL) for the CA, the name of the S3 bucket to which ACM PCA will write
  2060. // the CRL, and an optional CNAME alias that you can use to hide the name of
  2061. // your bucket in the CRL Distribution Points extension of your CA certificate.
  2062. // For more information, see the CrlConfiguration structure.
  2063. RevocationConfiguration *RevocationConfiguration `type:"structure"`
  2064. // Key-value pairs that will be attached to the new private CA. You can associate
  2065. // up to 50 tags with a private CA.
  2066. Tags []*Tag `min:"1" type:"list"`
  2067. }
  2068. // String returns the string representation
  2069. func (s CreateCertificateAuthorityInput) String() string {
  2070. return awsutil.Prettify(s)
  2071. }
  2072. // GoString returns the string representation
  2073. func (s CreateCertificateAuthorityInput) GoString() string {
  2074. return s.String()
  2075. }
  2076. // Validate inspects the fields of the type to determine if they are valid.
  2077. func (s *CreateCertificateAuthorityInput) Validate() error {
  2078. invalidParams := request.ErrInvalidParams{Context: "CreateCertificateAuthorityInput"}
  2079. if s.CertificateAuthorityConfiguration == nil {
  2080. invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityConfiguration"))
  2081. }
  2082. if s.CertificateAuthorityType == nil {
  2083. invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityType"))
  2084. }
  2085. if s.IdempotencyToken != nil && len(*s.IdempotencyToken) < 1 {
  2086. invalidParams.Add(request.NewErrParamMinLen("IdempotencyToken", 1))
  2087. }
  2088. if s.Tags != nil && len(s.Tags) < 1 {
  2089. invalidParams.Add(request.NewErrParamMinLen("Tags", 1))
  2090. }
  2091. if s.CertificateAuthorityConfiguration != nil {
  2092. if err := s.CertificateAuthorityConfiguration.Validate(); err != nil {
  2093. invalidParams.AddNested("CertificateAuthorityConfiguration", err.(request.ErrInvalidParams))
  2094. }
  2095. }
  2096. if s.RevocationConfiguration != nil {
  2097. if err := s.RevocationConfiguration.Validate(); err != nil {
  2098. invalidParams.AddNested("RevocationConfiguration", err.(request.ErrInvalidParams))
  2099. }
  2100. }
  2101. if s.Tags != nil {
  2102. for i, v := range s.Tags {
  2103. if v == nil {
  2104. continue
  2105. }
  2106. if err := v.Validate(); err != nil {
  2107. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  2108. }
  2109. }
  2110. }
  2111. if invalidParams.Len() > 0 {
  2112. return invalidParams
  2113. }
  2114. return nil
  2115. }
  2116. // SetCertificateAuthorityConfiguration sets the CertificateAuthorityConfiguration field's value.
  2117. func (s *CreateCertificateAuthorityInput) SetCertificateAuthorityConfiguration(v *CertificateAuthorityConfiguration) *CreateCertificateAuthorityInput {
  2118. s.CertificateAuthorityConfiguration = v
  2119. return s
  2120. }
  2121. // SetCertificateAuthorityType sets the CertificateAuthorityType field's value.
  2122. func (s *CreateCertificateAuthorityInput) SetCertificateAuthorityType(v string) *CreateCertificateAuthorityInput {
  2123. s.CertificateAuthorityType = &v
  2124. return s
  2125. }
  2126. // SetIdempotencyToken sets the IdempotencyToken field's value.
  2127. func (s *CreateCertificateAuthorityInput) SetIdempotencyToken(v string) *CreateCertificateAuthorityInput {
  2128. s.IdempotencyToken = &v
  2129. return s
  2130. }
  2131. // SetRevocationConfiguration sets the RevocationConfiguration field's value.
  2132. func (s *CreateCertificateAuthorityInput) SetRevocationConfiguration(v *RevocationConfiguration) *CreateCertificateAuthorityInput {
  2133. s.RevocationConfiguration = v
  2134. return s
  2135. }
  2136. // SetTags sets the Tags field's value.
  2137. func (s *CreateCertificateAuthorityInput) SetTags(v []*Tag) *CreateCertificateAuthorityInput {
  2138. s.Tags = v
  2139. return s
  2140. }
  2141. type CreateCertificateAuthorityOutput struct {
  2142. _ struct{} `type:"structure"`
  2143. // If successful, the Amazon Resource Name (ARN) of the certificate authority
  2144. // (CA). This is of the form:
  2145. //
  2146. // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012.
  2147. CertificateAuthorityArn *string `min:"5" type:"string"`
  2148. }
  2149. // String returns the string representation
  2150. func (s CreateCertificateAuthorityOutput) String() string {
  2151. return awsutil.Prettify(s)
  2152. }
  2153. // GoString returns the string representation
  2154. func (s CreateCertificateAuthorityOutput) GoString() string {
  2155. return s.String()
  2156. }
  2157. // SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value.
  2158. func (s *CreateCertificateAuthorityOutput) SetCertificateAuthorityArn(v string) *CreateCertificateAuthorityOutput {
  2159. s.CertificateAuthorityArn = &v
  2160. return s
  2161. }
  2162. // Contains configuration information for a certificate revocation list (CRL).
  2163. // Your private certificate authority (CA) creates base CRLs. Delta CRLs are
  2164. // not supported. You can enable CRLs for your new or an existing private CA
  2165. // by setting the Enabled parameter to true. Your private CA writes CRLs to
  2166. // an S3 bucket that you specify in the S3BucketName parameter. You can hide
  2167. // the name of your bucket by specifying a value for the CustomCname parameter.
  2168. // Your private CA copies the CNAME or the S3 bucket name to the CRL Distribution
  2169. // Points extension of each certificate it issues. Your S3 bucket policy must
  2170. // give write permission to ACM PCA.
  2171. //
  2172. // Your private CA uses the value in the ExpirationInDays parameter to calculate
  2173. // the nextUpdate field in the CRL. The CRL is refreshed at 1/2 the age of next
  2174. // update or when a certificate is revoked. When a certificate is revoked, it
  2175. // is recorded in the next CRL that is generated and in the next audit report.
  2176. // Only time valid certificates are listed in the CRL. Expired certificates
  2177. // are not included.
  2178. //
  2179. // CRLs contain the following fields:
  2180. //
  2181. // * Version: The current version number defined in RFC 5280 is V2. The integer
  2182. // value is 0x1.
  2183. //
  2184. // * Signature Algorithm: The name of the algorithm used to sign the CRL.
  2185. //
  2186. // * Issuer: The X.500 distinguished name of your private CA that issued
  2187. // the CRL.
  2188. //
  2189. // * Last Update: The issue date and time of this CRL.
  2190. //
  2191. // * Next Update: The day and time by which the next CRL will be issued.
  2192. //
  2193. // * Revoked Certificates: List of revoked certificates. Each list item contains
  2194. // the following information.
  2195. //
  2196. // Serial Number: The serial number, in hexadecimal format, of the revoked certificate.
  2197. //
  2198. // Revocation Date: Date and time the certificate was revoked.
  2199. //
  2200. // CRL Entry Extensions: Optional extensions for the CRL entry.
  2201. //
  2202. // X509v3 CRL Reason Code: Reason the certificate was revoked.
  2203. //
  2204. // * CRL Extensions: Optional extensions for the CRL.
  2205. //
  2206. // X509v3 Authority Key Identifier: Identifies the public key associated with
  2207. // the private key used to sign the certificate.
  2208. //
  2209. // X509v3 CRL Number:: Decimal sequence number for the CRL.
  2210. //
  2211. // * Signature Algorithm: Algorithm used by your private CA to sign the CRL.
  2212. //
  2213. // * Signature Value: Signature computed over the CRL.
  2214. //
  2215. // Certificate revocation lists created by ACM PCA are DER-encoded. You can
  2216. // use the following OpenSSL command to list a CRL.
  2217. //
  2218. // openssl crl -inform DER -text -in crl_path -noout
  2219. type CrlConfiguration struct {
  2220. _ struct{} `type:"structure"`
  2221. // Name inserted into the certificate CRL Distribution Points extension that
  2222. // enables the use of an alias for the CRL distribution point. Use this value
  2223. // if you don't want the name of your S3 bucket to be public.
  2224. CustomCname *string `type:"string"`
  2225. // Boolean value that specifies whether certificate revocation lists (CRLs)
  2226. // are enabled. You can use this value to enable certificate revocation for
  2227. // a new CA when you call the CreateCertificateAuthority operation or for an
  2228. // existing CA when you call the UpdateCertificateAuthority operation.
  2229. //
  2230. // Enabled is a required field
  2231. Enabled *bool `type:"boolean" required:"true"`
  2232. // Number of days until a certificate expires.
  2233. ExpirationInDays *int64 `min:"1" type:"integer"`
  2234. // Name of the S3 bucket that contains the CRL. If you do not provide a value
  2235. // for the CustomCname argument, the name of your S3 bucket is placed into the
  2236. // CRL Distribution Points extension of the issued certificate. You can change
  2237. // the name of your bucket by calling the UpdateCertificateAuthority operation.
  2238. // You must specify a bucket policy that allows ACM PCA to write the CRL to
  2239. // your bucket.
  2240. S3BucketName *string `min:"3" type:"string"`
  2241. }
  2242. // String returns the string representation
  2243. func (s CrlConfiguration) String() string {
  2244. return awsutil.Prettify(s)
  2245. }
  2246. // GoString returns the string representation
  2247. func (s CrlConfiguration) GoString() string {
  2248. return s.String()
  2249. }
  2250. // Validate inspects the fields of the type to determine if they are valid.
  2251. func (s *CrlConfiguration) Validate() error {
  2252. invalidParams := request.ErrInvalidParams{Context: "CrlConfiguration"}
  2253. if s.Enabled == nil {
  2254. invalidParams.Add(request.NewErrParamRequired("Enabled"))
  2255. }
  2256. if s.ExpirationInDays != nil && *s.ExpirationInDays < 1 {
  2257. invalidParams.Add(request.NewErrParamMinValue("ExpirationInDays", 1))
  2258. }
  2259. if s.S3BucketName != nil && len(*s.S3BucketName) < 3 {
  2260. invalidParams.Add(request.NewErrParamMinLen("S3BucketName", 3))
  2261. }
  2262. if invalidParams.Len() > 0 {
  2263. return invalidParams
  2264. }
  2265. return nil
  2266. }
  2267. // SetCustomCname sets the CustomCname field's value.
  2268. func (s *CrlConfiguration) SetCustomCname(v string) *CrlConfiguration {
  2269. s.CustomCname = &v
  2270. return s
  2271. }
  2272. // SetEnabled sets the Enabled field's value.
  2273. func (s *CrlConfiguration) SetEnabled(v bool) *CrlConfiguration {
  2274. s.Enabled = &v
  2275. return s
  2276. }
  2277. // SetExpirationInDays sets the ExpirationInDays field's value.
  2278. func (s *CrlConfiguration) SetExpirationInDays(v int64) *CrlConfiguration {
  2279. s.ExpirationInDays = &v
  2280. return s
  2281. }
  2282. // SetS3BucketName sets the S3BucketName field's value.
  2283. func (s *CrlConfiguration) SetS3BucketName(v string) *CrlConfiguration {
  2284. s.S3BucketName = &v
  2285. return s
  2286. }
  2287. type DeleteCertificateAuthorityInput struct {
  2288. _ struct{} `type:"structure"`
  2289. // The Amazon Resource Name (ARN) that was returned when you called CreateCertificateAuthority.
  2290. // This must have the following form:
  2291. //
  2292. // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012.
  2293. //
  2294. // CertificateAuthorityArn is a required field
  2295. CertificateAuthorityArn *string `min:"5" type:"string" required:"true"`
  2296. // The number of days to make a CA restorable after it has been deleted. This
  2297. // can be anywhere from 7 to 30 days, with 30 being the default.
  2298. PermanentDeletionTimeInDays *int64 `min:"7" type:"integer"`
  2299. }
  2300. // String returns the string representation
  2301. func (s DeleteCertificateAuthorityInput) String() string {
  2302. return awsutil.Prettify(s)
  2303. }
  2304. // GoString returns the string representation
  2305. func (s DeleteCertificateAuthorityInput) GoString() string {
  2306. return s.String()
  2307. }
  2308. // Validate inspects the fields of the type to determine if they are valid.
  2309. func (s *DeleteCertificateAuthorityInput) Validate() error {
  2310. invalidParams := request.ErrInvalidParams{Context: "DeleteCertificateAuthorityInput"}
  2311. if s.CertificateAuthorityArn == nil {
  2312. invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn"))
  2313. }
  2314. if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 {
  2315. invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5))
  2316. }
  2317. if s.PermanentDeletionTimeInDays != nil && *s.PermanentDeletionTimeInDays < 7 {
  2318. invalidParams.Add(request.NewErrParamMinValue("PermanentDeletionTimeInDays", 7))
  2319. }
  2320. if invalidParams.Len() > 0 {
  2321. return invalidParams
  2322. }
  2323. return nil
  2324. }
  2325. // SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value.
  2326. func (s *DeleteCertificateAuthorityInput) SetCertificateAuthorityArn(v string) *DeleteCertificateAuthorityInput {
  2327. s.CertificateAuthorityArn = &v
  2328. return s
  2329. }
  2330. // SetPermanentDeletionTimeInDays sets the PermanentDeletionTimeInDays field's value.
  2331. func (s *DeleteCertificateAuthorityInput) SetPermanentDeletionTimeInDays(v int64) *DeleteCertificateAuthorityInput {
  2332. s.PermanentDeletionTimeInDays = &v
  2333. return s
  2334. }
  2335. type DeleteCertificateAuthorityOutput struct {
  2336. _ struct{} `type:"structure"`
  2337. }
  2338. // String returns the string representation
  2339. func (s DeleteCertificateAuthorityOutput) String() string {
  2340. return awsutil.Prettify(s)
  2341. }
  2342. // GoString returns the string representation
  2343. func (s DeleteCertificateAuthorityOutput) GoString() string {
  2344. return s.String()
  2345. }
  2346. type DescribeCertificateAuthorityAuditReportInput struct {
  2347. _ struct{} `type:"structure"`
  2348. // The report ID returned by calling the CreateCertificateAuthorityAuditReport
  2349. // operation.
  2350. //
  2351. // AuditReportId is a required field
  2352. AuditReportId *string `min:"36" type:"string" required:"true"`
  2353. // The Amazon Resource Name (ARN) of the private CA. This must be of the form:
  2354. //
  2355. // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012.
  2356. //
  2357. // CertificateAuthorityArn is a required field
  2358. CertificateAuthorityArn *string `min:"5" type:"string" required:"true"`
  2359. }
  2360. // String returns the string representation
  2361. func (s DescribeCertificateAuthorityAuditReportInput) String() string {
  2362. return awsutil.Prettify(s)
  2363. }
  2364. // GoString returns the string representation
  2365. func (s DescribeCertificateAuthorityAuditReportInput) GoString() string {
  2366. return s.String()
  2367. }
  2368. // Validate inspects the fields of the type to determine if they are valid.
  2369. func (s *DescribeCertificateAuthorityAuditReportInput) Validate() error {
  2370. invalidParams := request.ErrInvalidParams{Context: "DescribeCertificateAuthorityAuditReportInput"}
  2371. if s.AuditReportId == nil {
  2372. invalidParams.Add(request.NewErrParamRequired("AuditReportId"))
  2373. }
  2374. if s.AuditReportId != nil && len(*s.AuditReportId) < 36 {
  2375. invalidParams.Add(request.NewErrParamMinLen("AuditReportId", 36))
  2376. }
  2377. if s.CertificateAuthorityArn == nil {
  2378. invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn"))
  2379. }
  2380. if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 {
  2381. invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5))
  2382. }
  2383. if invalidParams.Len() > 0 {
  2384. return invalidParams
  2385. }
  2386. return nil
  2387. }
  2388. // SetAuditReportId sets the AuditReportId field's value.
  2389. func (s *DescribeCertificateAuthorityAuditReportInput) SetAuditReportId(v string) *DescribeCertificateAuthorityAuditReportInput {
  2390. s.AuditReportId = &v
  2391. return s
  2392. }
  2393. // SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value.
  2394. func (s *DescribeCertificateAuthorityAuditReportInput) SetCertificateAuthorityArn(v string) *DescribeCertificateAuthorityAuditReportInput {
  2395. s.CertificateAuthorityArn = &v
  2396. return s
  2397. }
  2398. type DescribeCertificateAuthorityAuditReportOutput struct {
  2399. _ struct{} `type:"structure"`
  2400. // Specifies whether report creation is in progress, has succeeded, or has failed.
  2401. AuditReportStatus *string `type:"string" enum:"AuditReportStatus"`
  2402. // The date and time at which the report was created.
  2403. CreatedAt *time.Time `type:"timestamp"`
  2404. // Name of the S3 bucket that contains the report.
  2405. S3BucketName *string `type:"string"`
  2406. // S3 key that uniquely identifies the report file in your S3 bucket.
  2407. S3Key *string `type:"string"`
  2408. }
  2409. // String returns the string representation
  2410. func (s DescribeCertificateAuthorityAuditReportOutput) String() string {
  2411. return awsutil.Prettify(s)
  2412. }
  2413. // GoString returns the string representation
  2414. func (s DescribeCertificateAuthorityAuditReportOutput) GoString() string {
  2415. return s.String()
  2416. }
  2417. // SetAuditReportStatus sets the AuditReportStatus field's value.
  2418. func (s *DescribeCertificateAuthorityAuditReportOutput) SetAuditReportStatus(v string) *DescribeCertificateAuthorityAuditReportOutput {
  2419. s.AuditReportStatus = &v
  2420. return s
  2421. }
  2422. // SetCreatedAt sets the CreatedAt field's value.
  2423. func (s *DescribeCertificateAuthorityAuditReportOutput) SetCreatedAt(v time.Time) *DescribeCertificateAuthorityAuditReportOutput {
  2424. s.CreatedAt = &v
  2425. return s
  2426. }
  2427. // SetS3BucketName sets the S3BucketName field's value.
  2428. func (s *DescribeCertificateAuthorityAuditReportOutput) SetS3BucketName(v string) *DescribeCertificateAuthorityAuditReportOutput {
  2429. s.S3BucketName = &v
  2430. return s
  2431. }
  2432. // SetS3Key sets the S3Key field's value.
  2433. func (s *DescribeCertificateAuthorityAuditReportOutput) SetS3Key(v string) *DescribeCertificateAuthorityAuditReportOutput {
  2434. s.S3Key = &v
  2435. return s
  2436. }
  2437. type DescribeCertificateAuthorityInput struct {
  2438. _ struct{} `type:"structure"`
  2439. // The Amazon Resource Name (ARN) that was returned when you called CreateCertificateAuthority.
  2440. // This must be of the form:
  2441. //
  2442. // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012.
  2443. //
  2444. // CertificateAuthorityArn is a required field
  2445. CertificateAuthorityArn *string `min:"5" type:"string" required:"true"`
  2446. }
  2447. // String returns the string representation
  2448. func (s DescribeCertificateAuthorityInput) String() string {
  2449. return awsutil.Prettify(s)
  2450. }
  2451. // GoString returns the string representation
  2452. func (s DescribeCertificateAuthorityInput) GoString() string {
  2453. return s.String()
  2454. }
  2455. // Validate inspects the fields of the type to determine if they are valid.
  2456. func (s *DescribeCertificateAuthorityInput) Validate() error {
  2457. invalidParams := request.ErrInvalidParams{Context: "DescribeCertificateAuthorityInput"}
  2458. if s.CertificateAuthorityArn == nil {
  2459. invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn"))
  2460. }
  2461. if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 {
  2462. invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5))
  2463. }
  2464. if invalidParams.Len() > 0 {
  2465. return invalidParams
  2466. }
  2467. return nil
  2468. }
  2469. // SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value.
  2470. func (s *DescribeCertificateAuthorityInput) SetCertificateAuthorityArn(v string) *DescribeCertificateAuthorityInput {
  2471. s.CertificateAuthorityArn = &v
  2472. return s
  2473. }
  2474. type DescribeCertificateAuthorityOutput struct {
  2475. _ struct{} `type:"structure"`
  2476. // A CertificateAuthority structure that contains information about your private
  2477. // CA.
  2478. CertificateAuthority *CertificateAuthority `type:"structure"`
  2479. }
  2480. // String returns the string representation
  2481. func (s DescribeCertificateAuthorityOutput) String() string {
  2482. return awsutil.Prettify(s)
  2483. }
  2484. // GoString returns the string representation
  2485. func (s DescribeCertificateAuthorityOutput) GoString() string {
  2486. return s.String()
  2487. }
  2488. // SetCertificateAuthority sets the CertificateAuthority field's value.
  2489. func (s *DescribeCertificateAuthorityOutput) SetCertificateAuthority(v *CertificateAuthority) *DescribeCertificateAuthorityOutput {
  2490. s.CertificateAuthority = v
  2491. return s
  2492. }
  2493. type GetCertificateAuthorityCertificateInput struct {
  2494. _ struct{} `type:"structure"`
  2495. // The Amazon Resource Name (ARN) of your private CA. This is of the form:
  2496. //
  2497. // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012.
  2498. //
  2499. // CertificateAuthorityArn is a required field
  2500. CertificateAuthorityArn *string `min:"5" type:"string" required:"true"`
  2501. }
  2502. // String returns the string representation
  2503. func (s GetCertificateAuthorityCertificateInput) String() string {
  2504. return awsutil.Prettify(s)
  2505. }
  2506. // GoString returns the string representation
  2507. func (s GetCertificateAuthorityCertificateInput) GoString() string {
  2508. return s.String()
  2509. }
  2510. // Validate inspects the fields of the type to determine if they are valid.
  2511. func (s *GetCertificateAuthorityCertificateInput) Validate() error {
  2512. invalidParams := request.ErrInvalidParams{Context: "GetCertificateAuthorityCertificateInput"}
  2513. if s.CertificateAuthorityArn == nil {
  2514. invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn"))
  2515. }
  2516. if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 {
  2517. invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5))
  2518. }
  2519. if invalidParams.Len() > 0 {
  2520. return invalidParams
  2521. }
  2522. return nil
  2523. }
  2524. // SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value.
  2525. func (s *GetCertificateAuthorityCertificateInput) SetCertificateAuthorityArn(v string) *GetCertificateAuthorityCertificateInput {
  2526. s.CertificateAuthorityArn = &v
  2527. return s
  2528. }
  2529. type GetCertificateAuthorityCertificateOutput struct {
  2530. _ struct{} `type:"structure"`
  2531. // Base64-encoded certificate authority (CA) certificate.
  2532. Certificate *string `type:"string"`
  2533. // Base64-encoded certificate chain that includes any intermediate certificates
  2534. // and chains up to root on-premises certificate that you used to sign your
  2535. // private CA certificate. The chain does not include your private CA certificate.
  2536. CertificateChain *string `type:"string"`
  2537. }
  2538. // String returns the string representation
  2539. func (s GetCertificateAuthorityCertificateOutput) String() string {
  2540. return awsutil.Prettify(s)
  2541. }
  2542. // GoString returns the string representation
  2543. func (s GetCertificateAuthorityCertificateOutput) GoString() string {
  2544. return s.String()
  2545. }
  2546. // SetCertificate sets the Certificate field's value.
  2547. func (s *GetCertificateAuthorityCertificateOutput) SetCertificate(v string) *GetCertificateAuthorityCertificateOutput {
  2548. s.Certificate = &v
  2549. return s
  2550. }
  2551. // SetCertificateChain sets the CertificateChain field's value.
  2552. func (s *GetCertificateAuthorityCertificateOutput) SetCertificateChain(v string) *GetCertificateAuthorityCertificateOutput {
  2553. s.CertificateChain = &v
  2554. return s
  2555. }
  2556. type GetCertificateAuthorityCsrInput struct {
  2557. _ struct{} `type:"structure"`
  2558. // The Amazon Resource Name (ARN) that was returned when you called the CreateCertificateAuthority
  2559. // operation. This must be of the form:
  2560. //
  2561. // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012
  2562. //
  2563. // CertificateAuthorityArn is a required field
  2564. CertificateAuthorityArn *string `min:"5" type:"string" required:"true"`
  2565. }
  2566. // String returns the string representation
  2567. func (s GetCertificateAuthorityCsrInput) String() string {
  2568. return awsutil.Prettify(s)
  2569. }
  2570. // GoString returns the string representation
  2571. func (s GetCertificateAuthorityCsrInput) GoString() string {
  2572. return s.String()
  2573. }
  2574. // Validate inspects the fields of the type to determine if they are valid.
  2575. func (s *GetCertificateAuthorityCsrInput) Validate() error {
  2576. invalidParams := request.ErrInvalidParams{Context: "GetCertificateAuthorityCsrInput"}
  2577. if s.CertificateAuthorityArn == nil {
  2578. invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn"))
  2579. }
  2580. if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 {
  2581. invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5))
  2582. }
  2583. if invalidParams.Len() > 0 {
  2584. return invalidParams
  2585. }
  2586. return nil
  2587. }
  2588. // SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value.
  2589. func (s *GetCertificateAuthorityCsrInput) SetCertificateAuthorityArn(v string) *GetCertificateAuthorityCsrInput {
  2590. s.CertificateAuthorityArn = &v
  2591. return s
  2592. }
  2593. type GetCertificateAuthorityCsrOutput struct {
  2594. _ struct{} `type:"structure"`
  2595. // The base64 PEM-encoded certificate signing request (CSR) for your private
  2596. // CA certificate.
  2597. Csr *string `type:"string"`
  2598. }
  2599. // String returns the string representation
  2600. func (s GetCertificateAuthorityCsrOutput) String() string {
  2601. return awsutil.Prettify(s)
  2602. }
  2603. // GoString returns the string representation
  2604. func (s GetCertificateAuthorityCsrOutput) GoString() string {
  2605. return s.String()
  2606. }
  2607. // SetCsr sets the Csr field's value.
  2608. func (s *GetCertificateAuthorityCsrOutput) SetCsr(v string) *GetCertificateAuthorityCsrOutput {
  2609. s.Csr = &v
  2610. return s
  2611. }
  2612. type GetCertificateInput struct {
  2613. _ struct{} `type:"structure"`
  2614. // The ARN of the issued certificate. The ARN contains the certificate serial
  2615. // number and must be in the following form:
  2616. //
  2617. // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012/certificate/286535153982981100925020015808220737245
  2618. //
  2619. // CertificateArn is a required field
  2620. CertificateArn *string `min:"5" type:"string" required:"true"`
  2621. // The Amazon Resource Name (ARN) that was returned when you called CreateCertificateAuthority.
  2622. // This must be of the form:
  2623. //
  2624. // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012.
  2625. //
  2626. // CertificateAuthorityArn is a required field
  2627. CertificateAuthorityArn *string `min:"5" type:"string" required:"true"`
  2628. }
  2629. // String returns the string representation
  2630. func (s GetCertificateInput) String() string {
  2631. return awsutil.Prettify(s)
  2632. }
  2633. // GoString returns the string representation
  2634. func (s GetCertificateInput) GoString() string {
  2635. return s.String()
  2636. }
  2637. // Validate inspects the fields of the type to determine if they are valid.
  2638. func (s *GetCertificateInput) Validate() error {
  2639. invalidParams := request.ErrInvalidParams{Context: "GetCertificateInput"}
  2640. if s.CertificateArn == nil {
  2641. invalidParams.Add(request.NewErrParamRequired("CertificateArn"))
  2642. }
  2643. if s.CertificateArn != nil && len(*s.CertificateArn) < 5 {
  2644. invalidParams.Add(request.NewErrParamMinLen("CertificateArn", 5))
  2645. }
  2646. if s.CertificateAuthorityArn == nil {
  2647. invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn"))
  2648. }
  2649. if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 {
  2650. invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5))
  2651. }
  2652. if invalidParams.Len() > 0 {
  2653. return invalidParams
  2654. }
  2655. return nil
  2656. }
  2657. // SetCertificateArn sets the CertificateArn field's value.
  2658. func (s *GetCertificateInput) SetCertificateArn(v string) *GetCertificateInput {
  2659. s.CertificateArn = &v
  2660. return s
  2661. }
  2662. // SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value.
  2663. func (s *GetCertificateInput) SetCertificateAuthorityArn(v string) *GetCertificateInput {
  2664. s.CertificateAuthorityArn = &v
  2665. return s
  2666. }
  2667. type GetCertificateOutput struct {
  2668. _ struct{} `type:"structure"`
  2669. // The base64 PEM-encoded certificate specified by the CertificateArn parameter.
  2670. Certificate *string `type:"string"`
  2671. // The base64 PEM-encoded certificate chain that chains up to the on-premises
  2672. // root CA certificate that you used to sign your private CA certificate.
  2673. CertificateChain *string `type:"string"`
  2674. }
  2675. // String returns the string representation
  2676. func (s GetCertificateOutput) String() string {
  2677. return awsutil.Prettify(s)
  2678. }
  2679. // GoString returns the string representation
  2680. func (s GetCertificateOutput) GoString() string {
  2681. return s.String()
  2682. }
  2683. // SetCertificate sets the Certificate field's value.
  2684. func (s *GetCertificateOutput) SetCertificate(v string) *GetCertificateOutput {
  2685. s.Certificate = &v
  2686. return s
  2687. }
  2688. // SetCertificateChain sets the CertificateChain field's value.
  2689. func (s *GetCertificateOutput) SetCertificateChain(v string) *GetCertificateOutput {
  2690. s.CertificateChain = &v
  2691. return s
  2692. }
  2693. type ImportCertificateAuthorityCertificateInput struct {
  2694. _ struct{} `type:"structure"`
  2695. // The PEM-encoded certificate for your private CA. This must be signed by using
  2696. // your on-premises CA.
  2697. //
  2698. // Certificate is automatically base64 encoded/decoded by the SDK.
  2699. //
  2700. // Certificate is a required field
  2701. Certificate []byte `min:"1" type:"blob" required:"true"`
  2702. // The Amazon Resource Name (ARN) that was returned when you called CreateCertificateAuthority.
  2703. // This must be of the form:
  2704. //
  2705. // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012
  2706. //
  2707. // CertificateAuthorityArn is a required field
  2708. CertificateAuthorityArn *string `min:"5" type:"string" required:"true"`
  2709. // A PEM-encoded file that contains all of your certificates, other than the
  2710. // certificate you're importing, chaining up to your root CA. Your on-premises
  2711. // root certificate is the last in the chain, and each certificate in the chain
  2712. // signs the one preceding.
  2713. //
  2714. // CertificateChain is automatically base64 encoded/decoded by the SDK.
  2715. //
  2716. // CertificateChain is a required field
  2717. CertificateChain []byte `type:"blob" required:"true"`
  2718. }
  2719. // String returns the string representation
  2720. func (s ImportCertificateAuthorityCertificateInput) String() string {
  2721. return awsutil.Prettify(s)
  2722. }
  2723. // GoString returns the string representation
  2724. func (s ImportCertificateAuthorityCertificateInput) GoString() string {
  2725. return s.String()
  2726. }
  2727. // Validate inspects the fields of the type to determine if they are valid.
  2728. func (s *ImportCertificateAuthorityCertificateInput) Validate() error {
  2729. invalidParams := request.ErrInvalidParams{Context: "ImportCertificateAuthorityCertificateInput"}
  2730. if s.Certificate == nil {
  2731. invalidParams.Add(request.NewErrParamRequired("Certificate"))
  2732. }
  2733. if s.Certificate != nil && len(s.Certificate) < 1 {
  2734. invalidParams.Add(request.NewErrParamMinLen("Certificate", 1))
  2735. }
  2736. if s.CertificateAuthorityArn == nil {
  2737. invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn"))
  2738. }
  2739. if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 {
  2740. invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5))
  2741. }
  2742. if s.CertificateChain == nil {
  2743. invalidParams.Add(request.NewErrParamRequired("CertificateChain"))
  2744. }
  2745. if invalidParams.Len() > 0 {
  2746. return invalidParams
  2747. }
  2748. return nil
  2749. }
  2750. // SetCertificate sets the Certificate field's value.
  2751. func (s *ImportCertificateAuthorityCertificateInput) SetCertificate(v []byte) *ImportCertificateAuthorityCertificateInput {
  2752. s.Certificate = v
  2753. return s
  2754. }
  2755. // SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value.
  2756. func (s *ImportCertificateAuthorityCertificateInput) SetCertificateAuthorityArn(v string) *ImportCertificateAuthorityCertificateInput {
  2757. s.CertificateAuthorityArn = &v
  2758. return s
  2759. }
  2760. // SetCertificateChain sets the CertificateChain field's value.
  2761. func (s *ImportCertificateAuthorityCertificateInput) SetCertificateChain(v []byte) *ImportCertificateAuthorityCertificateInput {
  2762. s.CertificateChain = v
  2763. return s
  2764. }
  2765. type ImportCertificateAuthorityCertificateOutput struct {
  2766. _ struct{} `type:"structure"`
  2767. }
  2768. // String returns the string representation
  2769. func (s ImportCertificateAuthorityCertificateOutput) String() string {
  2770. return awsutil.Prettify(s)
  2771. }
  2772. // GoString returns the string representation
  2773. func (s ImportCertificateAuthorityCertificateOutput) GoString() string {
  2774. return s.String()
  2775. }
  2776. type IssueCertificateInput struct {
  2777. _ struct{} `type:"structure"`
  2778. // The Amazon Resource Name (ARN) that was returned when you called CreateCertificateAuthority.
  2779. // This must be of the form:
  2780. //
  2781. // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012
  2782. //
  2783. // CertificateAuthorityArn is a required field
  2784. CertificateAuthorityArn *string `min:"5" type:"string" required:"true"`
  2785. // The certificate signing request (CSR) for the certificate you want to issue.
  2786. // You can use the following OpenSSL command to create the CSR and a 2048 bit
  2787. // RSA private key.
  2788. //
  2789. // openssl req -new -newkey rsa:2048 -days 365 -keyout private/test_cert_priv_key.pem
  2790. // -out csr/test_cert_.csr
  2791. //
  2792. // If you have a configuration file, you can use the following OpenSSL command.
  2793. // The usr_cert block in the configuration file contains your X509 version 3
  2794. // extensions.
  2795. //
  2796. // openssl req -new -config openssl_rsa.cnf -extensions usr_cert -newkey rsa:2048
  2797. // -days -365 -keyout private/test_cert_priv_key.pem -out csr/test_cert_.csr
  2798. //
  2799. // Csr is automatically base64 encoded/decoded by the SDK.
  2800. //
  2801. // Csr is a required field
  2802. Csr []byte `min:"1" type:"blob" required:"true"`
  2803. // Custom string that can be used to distinguish between calls to the IssueCertificate
  2804. // operation. Idempotency tokens time out after one hour. Therefore, if you
  2805. // call IssueCertificate multiple times with the same idempotency token within
  2806. // 5 minutes, ACM PCA recognizes that you are requesting only one certificate
  2807. // and will issue only one. If you change the idempotency token for each call,
  2808. // PCA recognizes that you are requesting multiple certificates.
  2809. IdempotencyToken *string `min:"1" type:"string"`
  2810. // The name of the algorithm that will be used to sign the certificate to be
  2811. // issued.
  2812. //
  2813. // SigningAlgorithm is a required field
  2814. SigningAlgorithm *string `type:"string" required:"true" enum:"SigningAlgorithm"`
  2815. // The type of the validity period.
  2816. //
  2817. // Validity is a required field
  2818. Validity *Validity `type:"structure" required:"true"`
  2819. }
  2820. // String returns the string representation
  2821. func (s IssueCertificateInput) String() string {
  2822. return awsutil.Prettify(s)
  2823. }
  2824. // GoString returns the string representation
  2825. func (s IssueCertificateInput) GoString() string {
  2826. return s.String()
  2827. }
  2828. // Validate inspects the fields of the type to determine if they are valid.
  2829. func (s *IssueCertificateInput) Validate() error {
  2830. invalidParams := request.ErrInvalidParams{Context: "IssueCertificateInput"}
  2831. if s.CertificateAuthorityArn == nil {
  2832. invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn"))
  2833. }
  2834. if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 {
  2835. invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5))
  2836. }
  2837. if s.Csr == nil {
  2838. invalidParams.Add(request.NewErrParamRequired("Csr"))
  2839. }
  2840. if s.Csr != nil && len(s.Csr) < 1 {
  2841. invalidParams.Add(request.NewErrParamMinLen("Csr", 1))
  2842. }
  2843. if s.IdempotencyToken != nil && len(*s.IdempotencyToken) < 1 {
  2844. invalidParams.Add(request.NewErrParamMinLen("IdempotencyToken", 1))
  2845. }
  2846. if s.SigningAlgorithm == nil {
  2847. invalidParams.Add(request.NewErrParamRequired("SigningAlgorithm"))
  2848. }
  2849. if s.Validity == nil {
  2850. invalidParams.Add(request.NewErrParamRequired("Validity"))
  2851. }
  2852. if s.Validity != nil {
  2853. if err := s.Validity.Validate(); err != nil {
  2854. invalidParams.AddNested("Validity", err.(request.ErrInvalidParams))
  2855. }
  2856. }
  2857. if invalidParams.Len() > 0 {
  2858. return invalidParams
  2859. }
  2860. return nil
  2861. }
  2862. // SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value.
  2863. func (s *IssueCertificateInput) SetCertificateAuthorityArn(v string) *IssueCertificateInput {
  2864. s.CertificateAuthorityArn = &v
  2865. return s
  2866. }
  2867. // SetCsr sets the Csr field's value.
  2868. func (s *IssueCertificateInput) SetCsr(v []byte) *IssueCertificateInput {
  2869. s.Csr = v
  2870. return s
  2871. }
  2872. // SetIdempotencyToken sets the IdempotencyToken field's value.
  2873. func (s *IssueCertificateInput) SetIdempotencyToken(v string) *IssueCertificateInput {
  2874. s.IdempotencyToken = &v
  2875. return s
  2876. }
  2877. // SetSigningAlgorithm sets the SigningAlgorithm field's value.
  2878. func (s *IssueCertificateInput) SetSigningAlgorithm(v string) *IssueCertificateInput {
  2879. s.SigningAlgorithm = &v
  2880. return s
  2881. }
  2882. // SetValidity sets the Validity field's value.
  2883. func (s *IssueCertificateInput) SetValidity(v *Validity) *IssueCertificateInput {
  2884. s.Validity = v
  2885. return s
  2886. }
  2887. type IssueCertificateOutput struct {
  2888. _ struct{} `type:"structure"`
  2889. // The Amazon Resource Name (ARN) of the issued certificate and the certificate
  2890. // serial number. This is of the form:
  2891. //
  2892. // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012/certificate/286535153982981100925020015808220737245
  2893. CertificateArn *string `min:"5" type:"string"`
  2894. }
  2895. // String returns the string representation
  2896. func (s IssueCertificateOutput) String() string {
  2897. return awsutil.Prettify(s)
  2898. }
  2899. // GoString returns the string representation
  2900. func (s IssueCertificateOutput) GoString() string {
  2901. return s.String()
  2902. }
  2903. // SetCertificateArn sets the CertificateArn field's value.
  2904. func (s *IssueCertificateOutput) SetCertificateArn(v string) *IssueCertificateOutput {
  2905. s.CertificateArn = &v
  2906. return s
  2907. }
  2908. type ListCertificateAuthoritiesInput struct {
  2909. _ struct{} `type:"structure"`
  2910. // Use this parameter when paginating results to specify the maximum number
  2911. // of items to return in the response on each page. If additional items exist
  2912. // beyond the number you specify, the NextToken element is sent in the response.
  2913. // Use this NextToken value in a subsequent request to retrieve additional items.
  2914. MaxResults *int64 `min:"1" type:"integer"`
  2915. // Use this parameter when paginating results in a subsequent request after
  2916. // you receive a response with truncated results. Set it to the value of the
  2917. // NextToken parameter from the response you just received.
  2918. NextToken *string `min:"1" type:"string"`
  2919. }
  2920. // String returns the string representation
  2921. func (s ListCertificateAuthoritiesInput) String() string {
  2922. return awsutil.Prettify(s)
  2923. }
  2924. // GoString returns the string representation
  2925. func (s ListCertificateAuthoritiesInput) GoString() string {
  2926. return s.String()
  2927. }
  2928. // Validate inspects the fields of the type to determine if they are valid.
  2929. func (s *ListCertificateAuthoritiesInput) Validate() error {
  2930. invalidParams := request.ErrInvalidParams{Context: "ListCertificateAuthoritiesInput"}
  2931. if s.MaxResults != nil && *s.MaxResults < 1 {
  2932. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  2933. }
  2934. if s.NextToken != nil && len(*s.NextToken) < 1 {
  2935. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  2936. }
  2937. if invalidParams.Len() > 0 {
  2938. return invalidParams
  2939. }
  2940. return nil
  2941. }
  2942. // SetMaxResults sets the MaxResults field's value.
  2943. func (s *ListCertificateAuthoritiesInput) SetMaxResults(v int64) *ListCertificateAuthoritiesInput {
  2944. s.MaxResults = &v
  2945. return s
  2946. }
  2947. // SetNextToken sets the NextToken field's value.
  2948. func (s *ListCertificateAuthoritiesInput) SetNextToken(v string) *ListCertificateAuthoritiesInput {
  2949. s.NextToken = &v
  2950. return s
  2951. }
  2952. type ListCertificateAuthoritiesOutput struct {
  2953. _ struct{} `type:"structure"`
  2954. // Summary information about each certificate authority you have created.
  2955. CertificateAuthorities []*CertificateAuthority `type:"list"`
  2956. // When the list is truncated, this value is present and should be used for
  2957. // the NextToken parameter in a subsequent pagination request.
  2958. NextToken *string `min:"1" type:"string"`
  2959. }
  2960. // String returns the string representation
  2961. func (s ListCertificateAuthoritiesOutput) String() string {
  2962. return awsutil.Prettify(s)
  2963. }
  2964. // GoString returns the string representation
  2965. func (s ListCertificateAuthoritiesOutput) GoString() string {
  2966. return s.String()
  2967. }
  2968. // SetCertificateAuthorities sets the CertificateAuthorities field's value.
  2969. func (s *ListCertificateAuthoritiesOutput) SetCertificateAuthorities(v []*CertificateAuthority) *ListCertificateAuthoritiesOutput {
  2970. s.CertificateAuthorities = v
  2971. return s
  2972. }
  2973. // SetNextToken sets the NextToken field's value.
  2974. func (s *ListCertificateAuthoritiesOutput) SetNextToken(v string) *ListCertificateAuthoritiesOutput {
  2975. s.NextToken = &v
  2976. return s
  2977. }
  2978. type ListTagsInput struct {
  2979. _ struct{} `type:"structure"`
  2980. // The Amazon Resource Name (ARN) that was returned when you called the CreateCertificateAuthority
  2981. // operation. This must be of the form:
  2982. //
  2983. // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012
  2984. //
  2985. // CertificateAuthorityArn is a required field
  2986. CertificateAuthorityArn *string `min:"5" type:"string" required:"true"`
  2987. // Use this parameter when paginating results to specify the maximum number
  2988. // of items to return in the response. If additional items exist beyond the
  2989. // number you specify, the NextToken element is sent in the response. Use this
  2990. // NextToken value in a subsequent request to retrieve additional items.
  2991. MaxResults *int64 `min:"1" type:"integer"`
  2992. // Use this parameter when paginating results in a subsequent request after
  2993. // you receive a response with truncated results. Set it to the value of NextToken
  2994. // from the response you just received.
  2995. NextToken *string `min:"1" type:"string"`
  2996. }
  2997. // String returns the string representation
  2998. func (s ListTagsInput) String() string {
  2999. return awsutil.Prettify(s)
  3000. }
  3001. // GoString returns the string representation
  3002. func (s ListTagsInput) GoString() string {
  3003. return s.String()
  3004. }
  3005. // Validate inspects the fields of the type to determine if they are valid.
  3006. func (s *ListTagsInput) Validate() error {
  3007. invalidParams := request.ErrInvalidParams{Context: "ListTagsInput"}
  3008. if s.CertificateAuthorityArn == nil {
  3009. invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn"))
  3010. }
  3011. if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 {
  3012. invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5))
  3013. }
  3014. if s.MaxResults != nil && *s.MaxResults < 1 {
  3015. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  3016. }
  3017. if s.NextToken != nil && len(*s.NextToken) < 1 {
  3018. invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
  3019. }
  3020. if invalidParams.Len() > 0 {
  3021. return invalidParams
  3022. }
  3023. return nil
  3024. }
  3025. // SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value.
  3026. func (s *ListTagsInput) SetCertificateAuthorityArn(v string) *ListTagsInput {
  3027. s.CertificateAuthorityArn = &v
  3028. return s
  3029. }
  3030. // SetMaxResults sets the MaxResults field's value.
  3031. func (s *ListTagsInput) SetMaxResults(v int64) *ListTagsInput {
  3032. s.MaxResults = &v
  3033. return s
  3034. }
  3035. // SetNextToken sets the NextToken field's value.
  3036. func (s *ListTagsInput) SetNextToken(v string) *ListTagsInput {
  3037. s.NextToken = &v
  3038. return s
  3039. }
  3040. type ListTagsOutput struct {
  3041. _ struct{} `type:"structure"`
  3042. // When the list is truncated, this value is present and should be used for
  3043. // the NextToken parameter in a subsequent pagination request.
  3044. NextToken *string `min:"1" type:"string"`
  3045. // The tags associated with your private CA.
  3046. Tags []*Tag `min:"1" type:"list"`
  3047. }
  3048. // String returns the string representation
  3049. func (s ListTagsOutput) String() string {
  3050. return awsutil.Prettify(s)
  3051. }
  3052. // GoString returns the string representation
  3053. func (s ListTagsOutput) GoString() string {
  3054. return s.String()
  3055. }
  3056. // SetNextToken sets the NextToken field's value.
  3057. func (s *ListTagsOutput) SetNextToken(v string) *ListTagsOutput {
  3058. s.NextToken = &v
  3059. return s
  3060. }
  3061. // SetTags sets the Tags field's value.
  3062. func (s *ListTagsOutput) SetTags(v []*Tag) *ListTagsOutput {
  3063. s.Tags = v
  3064. return s
  3065. }
  3066. type RestoreCertificateAuthorityInput struct {
  3067. _ struct{} `type:"structure"`
  3068. // The Amazon Resource Name (ARN) that was returned when you called the CreateCertificateAuthority
  3069. // operation. This must be of the form:
  3070. //
  3071. // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012
  3072. //
  3073. // CertificateAuthorityArn is a required field
  3074. CertificateAuthorityArn *string `min:"5" type:"string" required:"true"`
  3075. }
  3076. // String returns the string representation
  3077. func (s RestoreCertificateAuthorityInput) String() string {
  3078. return awsutil.Prettify(s)
  3079. }
  3080. // GoString returns the string representation
  3081. func (s RestoreCertificateAuthorityInput) GoString() string {
  3082. return s.String()
  3083. }
  3084. // Validate inspects the fields of the type to determine if they are valid.
  3085. func (s *RestoreCertificateAuthorityInput) Validate() error {
  3086. invalidParams := request.ErrInvalidParams{Context: "RestoreCertificateAuthorityInput"}
  3087. if s.CertificateAuthorityArn == nil {
  3088. invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn"))
  3089. }
  3090. if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 {
  3091. invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5))
  3092. }
  3093. if invalidParams.Len() > 0 {
  3094. return invalidParams
  3095. }
  3096. return nil
  3097. }
  3098. // SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value.
  3099. func (s *RestoreCertificateAuthorityInput) SetCertificateAuthorityArn(v string) *RestoreCertificateAuthorityInput {
  3100. s.CertificateAuthorityArn = &v
  3101. return s
  3102. }
  3103. type RestoreCertificateAuthorityOutput struct {
  3104. _ struct{} `type:"structure"`
  3105. }
  3106. // String returns the string representation
  3107. func (s RestoreCertificateAuthorityOutput) String() string {
  3108. return awsutil.Prettify(s)
  3109. }
  3110. // GoString returns the string representation
  3111. func (s RestoreCertificateAuthorityOutput) GoString() string {
  3112. return s.String()
  3113. }
  3114. // Certificate revocation information used by the CreateCertificateAuthority
  3115. // and UpdateCertificateAuthority operations. Your private certificate authority
  3116. // (CA) can create and maintain a certificate revocation list (CRL). A CRL contains
  3117. // information about certificates revoked by your CA. For more information,
  3118. // see RevokeCertificate.
  3119. type RevocationConfiguration struct {
  3120. _ struct{} `type:"structure"`
  3121. // Configuration of the certificate revocation list (CRL), if any, maintained
  3122. // by your private CA.
  3123. CrlConfiguration *CrlConfiguration `type:"structure"`
  3124. }
  3125. // String returns the string representation
  3126. func (s RevocationConfiguration) String() string {
  3127. return awsutil.Prettify(s)
  3128. }
  3129. // GoString returns the string representation
  3130. func (s RevocationConfiguration) GoString() string {
  3131. return s.String()
  3132. }
  3133. // Validate inspects the fields of the type to determine if they are valid.
  3134. func (s *RevocationConfiguration) Validate() error {
  3135. invalidParams := request.ErrInvalidParams{Context: "RevocationConfiguration"}
  3136. if s.CrlConfiguration != nil {
  3137. if err := s.CrlConfiguration.Validate(); err != nil {
  3138. invalidParams.AddNested("CrlConfiguration", err.(request.ErrInvalidParams))
  3139. }
  3140. }
  3141. if invalidParams.Len() > 0 {
  3142. return invalidParams
  3143. }
  3144. return nil
  3145. }
  3146. // SetCrlConfiguration sets the CrlConfiguration field's value.
  3147. func (s *RevocationConfiguration) SetCrlConfiguration(v *CrlConfiguration) *RevocationConfiguration {
  3148. s.CrlConfiguration = v
  3149. return s
  3150. }
  3151. type RevokeCertificateInput struct {
  3152. _ struct{} `type:"structure"`
  3153. // Amazon Resource Name (ARN) of the private CA that issued the certificate
  3154. // to be revoked. This must be of the form:
  3155. //
  3156. // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012
  3157. //
  3158. // CertificateAuthorityArn is a required field
  3159. CertificateAuthorityArn *string `min:"5" type:"string" required:"true"`
  3160. // Serial number of the certificate to be revoked. This must be in hexadecimal
  3161. // format. You can retrieve the serial number by calling GetCertificate with
  3162. // the Amazon Resource Name (ARN) of the certificate you want and the ARN of
  3163. // your private CA. The GetCertificate operation retrieves the certificate in
  3164. // the PEM format. You can use the following OpenSSL command to list the certificate
  3165. // in text format and copy the hexadecimal serial number.
  3166. //
  3167. // openssl x509 -in file_path -text -noout
  3168. //
  3169. // You can also copy the serial number from the console or use the DescribeCertificate
  3170. // (https://docs.aws.amazon.com/acm/latest/APIReference/API_DescribeCertificate.html)
  3171. // operation in the AWS Certificate Manager API Reference.
  3172. //
  3173. // CertificateSerial is a required field
  3174. CertificateSerial *string `type:"string" required:"true"`
  3175. // Specifies why you revoked the certificate.
  3176. //
  3177. // RevocationReason is a required field
  3178. RevocationReason *string `type:"string" required:"true" enum:"RevocationReason"`
  3179. }
  3180. // String returns the string representation
  3181. func (s RevokeCertificateInput) String() string {
  3182. return awsutil.Prettify(s)
  3183. }
  3184. // GoString returns the string representation
  3185. func (s RevokeCertificateInput) GoString() string {
  3186. return s.String()
  3187. }
  3188. // Validate inspects the fields of the type to determine if they are valid.
  3189. func (s *RevokeCertificateInput) Validate() error {
  3190. invalidParams := request.ErrInvalidParams{Context: "RevokeCertificateInput"}
  3191. if s.CertificateAuthorityArn == nil {
  3192. invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn"))
  3193. }
  3194. if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 {
  3195. invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5))
  3196. }
  3197. if s.CertificateSerial == nil {
  3198. invalidParams.Add(request.NewErrParamRequired("CertificateSerial"))
  3199. }
  3200. if s.RevocationReason == nil {
  3201. invalidParams.Add(request.NewErrParamRequired("RevocationReason"))
  3202. }
  3203. if invalidParams.Len() > 0 {
  3204. return invalidParams
  3205. }
  3206. return nil
  3207. }
  3208. // SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value.
  3209. func (s *RevokeCertificateInput) SetCertificateAuthorityArn(v string) *RevokeCertificateInput {
  3210. s.CertificateAuthorityArn = &v
  3211. return s
  3212. }
  3213. // SetCertificateSerial sets the CertificateSerial field's value.
  3214. func (s *RevokeCertificateInput) SetCertificateSerial(v string) *RevokeCertificateInput {
  3215. s.CertificateSerial = &v
  3216. return s
  3217. }
  3218. // SetRevocationReason sets the RevocationReason field's value.
  3219. func (s *RevokeCertificateInput) SetRevocationReason(v string) *RevokeCertificateInput {
  3220. s.RevocationReason = &v
  3221. return s
  3222. }
  3223. type RevokeCertificateOutput struct {
  3224. _ struct{} `type:"structure"`
  3225. }
  3226. // String returns the string representation
  3227. func (s RevokeCertificateOutput) String() string {
  3228. return awsutil.Prettify(s)
  3229. }
  3230. // GoString returns the string representation
  3231. func (s RevokeCertificateOutput) GoString() string {
  3232. return s.String()
  3233. }
  3234. // Tags are labels that you can use to identify and organize your private CAs.
  3235. // Each tag consists of a key and an optional value. You can associate up to
  3236. // 50 tags with a private CA. To add one or more tags to a private CA, call
  3237. // the TagCertificateAuthority operation. To remove a tag, call the UntagCertificateAuthority
  3238. // operation.
  3239. type Tag struct {
  3240. _ struct{} `type:"structure"`
  3241. // Key (name) of the tag.
  3242. //
  3243. // Key is a required field
  3244. Key *string `min:"1" type:"string" required:"true"`
  3245. // Value of the tag.
  3246. Value *string `type:"string"`
  3247. }
  3248. // String returns the string representation
  3249. func (s Tag) String() string {
  3250. return awsutil.Prettify(s)
  3251. }
  3252. // GoString returns the string representation
  3253. func (s Tag) GoString() string {
  3254. return s.String()
  3255. }
  3256. // Validate inspects the fields of the type to determine if they are valid.
  3257. func (s *Tag) Validate() error {
  3258. invalidParams := request.ErrInvalidParams{Context: "Tag"}
  3259. if s.Key == nil {
  3260. invalidParams.Add(request.NewErrParamRequired("Key"))
  3261. }
  3262. if s.Key != nil && len(*s.Key) < 1 {
  3263. invalidParams.Add(request.NewErrParamMinLen("Key", 1))
  3264. }
  3265. if invalidParams.Len() > 0 {
  3266. return invalidParams
  3267. }
  3268. return nil
  3269. }
  3270. // SetKey sets the Key field's value.
  3271. func (s *Tag) SetKey(v string) *Tag {
  3272. s.Key = &v
  3273. return s
  3274. }
  3275. // SetValue sets the Value field's value.
  3276. func (s *Tag) SetValue(v string) *Tag {
  3277. s.Value = &v
  3278. return s
  3279. }
  3280. type TagCertificateAuthorityInput struct {
  3281. _ struct{} `type:"structure"`
  3282. // The Amazon Resource Name (ARN) that was returned when you called CreateCertificateAuthority.
  3283. // This must be of the form:
  3284. //
  3285. // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012
  3286. //
  3287. // CertificateAuthorityArn is a required field
  3288. CertificateAuthorityArn *string `min:"5" type:"string" required:"true"`
  3289. // List of tags to be associated with the CA.
  3290. //
  3291. // Tags is a required field
  3292. Tags []*Tag `min:"1" type:"list" required:"true"`
  3293. }
  3294. // String returns the string representation
  3295. func (s TagCertificateAuthorityInput) String() string {
  3296. return awsutil.Prettify(s)
  3297. }
  3298. // GoString returns the string representation
  3299. func (s TagCertificateAuthorityInput) GoString() string {
  3300. return s.String()
  3301. }
  3302. // Validate inspects the fields of the type to determine if they are valid.
  3303. func (s *TagCertificateAuthorityInput) Validate() error {
  3304. invalidParams := request.ErrInvalidParams{Context: "TagCertificateAuthorityInput"}
  3305. if s.CertificateAuthorityArn == nil {
  3306. invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn"))
  3307. }
  3308. if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 {
  3309. invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5))
  3310. }
  3311. if s.Tags == nil {
  3312. invalidParams.Add(request.NewErrParamRequired("Tags"))
  3313. }
  3314. if s.Tags != nil && len(s.Tags) < 1 {
  3315. invalidParams.Add(request.NewErrParamMinLen("Tags", 1))
  3316. }
  3317. if s.Tags != nil {
  3318. for i, v := range s.Tags {
  3319. if v == nil {
  3320. continue
  3321. }
  3322. if err := v.Validate(); err != nil {
  3323. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  3324. }
  3325. }
  3326. }
  3327. if invalidParams.Len() > 0 {
  3328. return invalidParams
  3329. }
  3330. return nil
  3331. }
  3332. // SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value.
  3333. func (s *TagCertificateAuthorityInput) SetCertificateAuthorityArn(v string) *TagCertificateAuthorityInput {
  3334. s.CertificateAuthorityArn = &v
  3335. return s
  3336. }
  3337. // SetTags sets the Tags field's value.
  3338. func (s *TagCertificateAuthorityInput) SetTags(v []*Tag) *TagCertificateAuthorityInput {
  3339. s.Tags = v
  3340. return s
  3341. }
  3342. type TagCertificateAuthorityOutput struct {
  3343. _ struct{} `type:"structure"`
  3344. }
  3345. // String returns the string representation
  3346. func (s TagCertificateAuthorityOutput) String() string {
  3347. return awsutil.Prettify(s)
  3348. }
  3349. // GoString returns the string representation
  3350. func (s TagCertificateAuthorityOutput) GoString() string {
  3351. return s.String()
  3352. }
  3353. type UntagCertificateAuthorityInput struct {
  3354. _ struct{} `type:"structure"`
  3355. // The Amazon Resource Name (ARN) that was returned when you called CreateCertificateAuthority.
  3356. // This must be of the form:
  3357. //
  3358. // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012
  3359. //
  3360. // CertificateAuthorityArn is a required field
  3361. CertificateAuthorityArn *string `min:"5" type:"string" required:"true"`
  3362. // List of tags to be removed from the CA.
  3363. //
  3364. // Tags is a required field
  3365. Tags []*Tag `min:"1" type:"list" required:"true"`
  3366. }
  3367. // String returns the string representation
  3368. func (s UntagCertificateAuthorityInput) String() string {
  3369. return awsutil.Prettify(s)
  3370. }
  3371. // GoString returns the string representation
  3372. func (s UntagCertificateAuthorityInput) GoString() string {
  3373. return s.String()
  3374. }
  3375. // Validate inspects the fields of the type to determine if they are valid.
  3376. func (s *UntagCertificateAuthorityInput) Validate() error {
  3377. invalidParams := request.ErrInvalidParams{Context: "UntagCertificateAuthorityInput"}
  3378. if s.CertificateAuthorityArn == nil {
  3379. invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn"))
  3380. }
  3381. if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 {
  3382. invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5))
  3383. }
  3384. if s.Tags == nil {
  3385. invalidParams.Add(request.NewErrParamRequired("Tags"))
  3386. }
  3387. if s.Tags != nil && len(s.Tags) < 1 {
  3388. invalidParams.Add(request.NewErrParamMinLen("Tags", 1))
  3389. }
  3390. if s.Tags != nil {
  3391. for i, v := range s.Tags {
  3392. if v == nil {
  3393. continue
  3394. }
  3395. if err := v.Validate(); err != nil {
  3396. invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams))
  3397. }
  3398. }
  3399. }
  3400. if invalidParams.Len() > 0 {
  3401. return invalidParams
  3402. }
  3403. return nil
  3404. }
  3405. // SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value.
  3406. func (s *UntagCertificateAuthorityInput) SetCertificateAuthorityArn(v string) *UntagCertificateAuthorityInput {
  3407. s.CertificateAuthorityArn = &v
  3408. return s
  3409. }
  3410. // SetTags sets the Tags field's value.
  3411. func (s *UntagCertificateAuthorityInput) SetTags(v []*Tag) *UntagCertificateAuthorityInput {
  3412. s.Tags = v
  3413. return s
  3414. }
  3415. type UntagCertificateAuthorityOutput struct {
  3416. _ struct{} `type:"structure"`
  3417. }
  3418. // String returns the string representation
  3419. func (s UntagCertificateAuthorityOutput) String() string {
  3420. return awsutil.Prettify(s)
  3421. }
  3422. // GoString returns the string representation
  3423. func (s UntagCertificateAuthorityOutput) GoString() string {
  3424. return s.String()
  3425. }
  3426. type UpdateCertificateAuthorityInput struct {
  3427. _ struct{} `type:"structure"`
  3428. // Amazon Resource Name (ARN) of the private CA that issued the certificate
  3429. // to be revoked. This must be of the form:
  3430. //
  3431. // arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012
  3432. //
  3433. // CertificateAuthorityArn is a required field
  3434. CertificateAuthorityArn *string `min:"5" type:"string" required:"true"`
  3435. // Revocation information for your private CA.
  3436. RevocationConfiguration *RevocationConfiguration `type:"structure"`
  3437. // Status of your private CA.
  3438. Status *string `type:"string" enum:"CertificateAuthorityStatus"`
  3439. }
  3440. // String returns the string representation
  3441. func (s UpdateCertificateAuthorityInput) String() string {
  3442. return awsutil.Prettify(s)
  3443. }
  3444. // GoString returns the string representation
  3445. func (s UpdateCertificateAuthorityInput) GoString() string {
  3446. return s.String()
  3447. }
  3448. // Validate inspects the fields of the type to determine if they are valid.
  3449. func (s *UpdateCertificateAuthorityInput) Validate() error {
  3450. invalidParams := request.ErrInvalidParams{Context: "UpdateCertificateAuthorityInput"}
  3451. if s.CertificateAuthorityArn == nil {
  3452. invalidParams.Add(request.NewErrParamRequired("CertificateAuthorityArn"))
  3453. }
  3454. if s.CertificateAuthorityArn != nil && len(*s.CertificateAuthorityArn) < 5 {
  3455. invalidParams.Add(request.NewErrParamMinLen("CertificateAuthorityArn", 5))
  3456. }
  3457. if s.RevocationConfiguration != nil {
  3458. if err := s.RevocationConfiguration.Validate(); err != nil {
  3459. invalidParams.AddNested("RevocationConfiguration", err.(request.ErrInvalidParams))
  3460. }
  3461. }
  3462. if invalidParams.Len() > 0 {
  3463. return invalidParams
  3464. }
  3465. return nil
  3466. }
  3467. // SetCertificateAuthorityArn sets the CertificateAuthorityArn field's value.
  3468. func (s *UpdateCertificateAuthorityInput) SetCertificateAuthorityArn(v string) *UpdateCertificateAuthorityInput {
  3469. s.CertificateAuthorityArn = &v
  3470. return s
  3471. }
  3472. // SetRevocationConfiguration sets the RevocationConfiguration field's value.
  3473. func (s *UpdateCertificateAuthorityInput) SetRevocationConfiguration(v *RevocationConfiguration) *UpdateCertificateAuthorityInput {
  3474. s.RevocationConfiguration = v
  3475. return s
  3476. }
  3477. // SetStatus sets the Status field's value.
  3478. func (s *UpdateCertificateAuthorityInput) SetStatus(v string) *UpdateCertificateAuthorityInput {
  3479. s.Status = &v
  3480. return s
  3481. }
  3482. type UpdateCertificateAuthorityOutput struct {
  3483. _ struct{} `type:"structure"`
  3484. }
  3485. // String returns the string representation
  3486. func (s UpdateCertificateAuthorityOutput) String() string {
  3487. return awsutil.Prettify(s)
  3488. }
  3489. // GoString returns the string representation
  3490. func (s UpdateCertificateAuthorityOutput) GoString() string {
  3491. return s.String()
  3492. }
  3493. // Length of time for which the certificate issued by your private certificate
  3494. // authority (CA), or by the private CA itself, is valid in days, months, or
  3495. // years. You can issue a certificate by calling the IssueCertificate operation.
  3496. type Validity struct {
  3497. _ struct{} `type:"structure"`
  3498. // Specifies whether the Value parameter represents days, months, or years.
  3499. //
  3500. // Type is a required field
  3501. Type *string `type:"string" required:"true" enum:"ValidityPeriodType"`
  3502. // Time period.
  3503. //
  3504. // Value is a required field
  3505. Value *int64 `min:"1" type:"long" required:"true"`
  3506. }
  3507. // String returns the string representation
  3508. func (s Validity) String() string {
  3509. return awsutil.Prettify(s)
  3510. }
  3511. // GoString returns the string representation
  3512. func (s Validity) GoString() string {
  3513. return s.String()
  3514. }
  3515. // Validate inspects the fields of the type to determine if they are valid.
  3516. func (s *Validity) Validate() error {
  3517. invalidParams := request.ErrInvalidParams{Context: "Validity"}
  3518. if s.Type == nil {
  3519. invalidParams.Add(request.NewErrParamRequired("Type"))
  3520. }
  3521. if s.Value == nil {
  3522. invalidParams.Add(request.NewErrParamRequired("Value"))
  3523. }
  3524. if s.Value != nil && *s.Value < 1 {
  3525. invalidParams.Add(request.NewErrParamMinValue("Value", 1))
  3526. }
  3527. if invalidParams.Len() > 0 {
  3528. return invalidParams
  3529. }
  3530. return nil
  3531. }
  3532. // SetType sets the Type field's value.
  3533. func (s *Validity) SetType(v string) *Validity {
  3534. s.Type = &v
  3535. return s
  3536. }
  3537. // SetValue sets the Value field's value.
  3538. func (s *Validity) SetValue(v int64) *Validity {
  3539. s.Value = &v
  3540. return s
  3541. }
  3542. const (
  3543. // AuditReportResponseFormatJson is a AuditReportResponseFormat enum value
  3544. AuditReportResponseFormatJson = "JSON"
  3545. // AuditReportResponseFormatCsv is a AuditReportResponseFormat enum value
  3546. AuditReportResponseFormatCsv = "CSV"
  3547. )
  3548. const (
  3549. // AuditReportStatusCreating is a AuditReportStatus enum value
  3550. AuditReportStatusCreating = "CREATING"
  3551. // AuditReportStatusSuccess is a AuditReportStatus enum value
  3552. AuditReportStatusSuccess = "SUCCESS"
  3553. // AuditReportStatusFailed is a AuditReportStatus enum value
  3554. AuditReportStatusFailed = "FAILED"
  3555. )
  3556. const (
  3557. // CertificateAuthorityStatusCreating is a CertificateAuthorityStatus enum value
  3558. CertificateAuthorityStatusCreating = "CREATING"
  3559. // CertificateAuthorityStatusPendingCertificate is a CertificateAuthorityStatus enum value
  3560. CertificateAuthorityStatusPendingCertificate = "PENDING_CERTIFICATE"
  3561. // CertificateAuthorityStatusActive is a CertificateAuthorityStatus enum value
  3562. CertificateAuthorityStatusActive = "ACTIVE"
  3563. // CertificateAuthorityStatusDeleted is a CertificateAuthorityStatus enum value
  3564. CertificateAuthorityStatusDeleted = "DELETED"
  3565. // CertificateAuthorityStatusDisabled is a CertificateAuthorityStatus enum value
  3566. CertificateAuthorityStatusDisabled = "DISABLED"
  3567. // CertificateAuthorityStatusExpired is a CertificateAuthorityStatus enum value
  3568. CertificateAuthorityStatusExpired = "EXPIRED"
  3569. // CertificateAuthorityStatusFailed is a CertificateAuthorityStatus enum value
  3570. CertificateAuthorityStatusFailed = "FAILED"
  3571. )
  3572. const (
  3573. // CertificateAuthorityTypeSubordinate is a CertificateAuthorityType enum value
  3574. CertificateAuthorityTypeSubordinate = "SUBORDINATE"
  3575. )
  3576. const (
  3577. // FailureReasonRequestTimedOut is a FailureReason enum value
  3578. FailureReasonRequestTimedOut = "REQUEST_TIMED_OUT"
  3579. // FailureReasonUnsupportedAlgorithm is a FailureReason enum value
  3580. FailureReasonUnsupportedAlgorithm = "UNSUPPORTED_ALGORITHM"
  3581. // FailureReasonOther is a FailureReason enum value
  3582. FailureReasonOther = "OTHER"
  3583. )
  3584. const (
  3585. // KeyAlgorithmRsa2048 is a KeyAlgorithm enum value
  3586. KeyAlgorithmRsa2048 = "RSA_2048"
  3587. // KeyAlgorithmRsa4096 is a KeyAlgorithm enum value
  3588. KeyAlgorithmRsa4096 = "RSA_4096"
  3589. // KeyAlgorithmEcPrime256v1 is a KeyAlgorithm enum value
  3590. KeyAlgorithmEcPrime256v1 = "EC_prime256v1"
  3591. // KeyAlgorithmEcSecp384r1 is a KeyAlgorithm enum value
  3592. KeyAlgorithmEcSecp384r1 = "EC_secp384r1"
  3593. )
  3594. const (
  3595. // RevocationReasonUnspecified is a RevocationReason enum value
  3596. RevocationReasonUnspecified = "UNSPECIFIED"
  3597. // RevocationReasonKeyCompromise is a RevocationReason enum value
  3598. RevocationReasonKeyCompromise = "KEY_COMPROMISE"
  3599. // RevocationReasonCertificateAuthorityCompromise is a RevocationReason enum value
  3600. RevocationReasonCertificateAuthorityCompromise = "CERTIFICATE_AUTHORITY_COMPROMISE"
  3601. // RevocationReasonAffiliationChanged is a RevocationReason enum value
  3602. RevocationReasonAffiliationChanged = "AFFILIATION_CHANGED"
  3603. // RevocationReasonSuperseded is a RevocationReason enum value
  3604. RevocationReasonSuperseded = "SUPERSEDED"
  3605. // RevocationReasonCessationOfOperation is a RevocationReason enum value
  3606. RevocationReasonCessationOfOperation = "CESSATION_OF_OPERATION"
  3607. // RevocationReasonPrivilegeWithdrawn is a RevocationReason enum value
  3608. RevocationReasonPrivilegeWithdrawn = "PRIVILEGE_WITHDRAWN"
  3609. // RevocationReasonAACompromise is a RevocationReason enum value
  3610. RevocationReasonAACompromise = "A_A_COMPROMISE"
  3611. )
  3612. const (
  3613. // SigningAlgorithmSha256withecdsa is a SigningAlgorithm enum value
  3614. SigningAlgorithmSha256withecdsa = "SHA256WITHECDSA"
  3615. // SigningAlgorithmSha384withecdsa is a SigningAlgorithm enum value
  3616. SigningAlgorithmSha384withecdsa = "SHA384WITHECDSA"
  3617. // SigningAlgorithmSha512withecdsa is a SigningAlgorithm enum value
  3618. SigningAlgorithmSha512withecdsa = "SHA512WITHECDSA"
  3619. // SigningAlgorithmSha256withrsa is a SigningAlgorithm enum value
  3620. SigningAlgorithmSha256withrsa = "SHA256WITHRSA"
  3621. // SigningAlgorithmSha384withrsa is a SigningAlgorithm enum value
  3622. SigningAlgorithmSha384withrsa = "SHA384WITHRSA"
  3623. // SigningAlgorithmSha512withrsa is a SigningAlgorithm enum value
  3624. SigningAlgorithmSha512withrsa = "SHA512WITHRSA"
  3625. )
  3626. const (
  3627. // ValidityPeriodTypeEndDate is a ValidityPeriodType enum value
  3628. ValidityPeriodTypeEndDate = "END_DATE"
  3629. // ValidityPeriodTypeAbsolute is a ValidityPeriodType enum value
  3630. ValidityPeriodTypeAbsolute = "ABSOLUTE"
  3631. // ValidityPeriodTypeDays is a ValidityPeriodType enum value
  3632. ValidityPeriodTypeDays = "DAYS"
  3633. // ValidityPeriodTypeMonths is a ValidityPeriodType enum value
  3634. ValidityPeriodTypeMonths = "MONTHS"
  3635. // ValidityPeriodTypeYears is a ValidityPeriodType enum value
  3636. ValidityPeriodTypeYears = "YEARS"
  3637. )