api.go 98 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867
  1. // THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
  2. // Package ecr provides a client for Amazon EC2 Container Registry.
  3. package ecr
  4. import (
  5. "time"
  6. "github.com/aws/aws-sdk-go/aws/awsutil"
  7. "github.com/aws/aws-sdk-go/aws/request"
  8. )
  9. const opBatchCheckLayerAvailability = "BatchCheckLayerAvailability"
  10. // BatchCheckLayerAvailabilityRequest generates a "aws/request.Request" representing the
  11. // client's request for the BatchCheckLayerAvailability operation. The "output" return
  12. // value can be used to capture response data after the request's "Send" method
  13. // is called.
  14. //
  15. // See BatchCheckLayerAvailability for usage and error information.
  16. //
  17. // Creating a request object using this method should be used when you want to inject
  18. // custom logic into the request's lifecycle using a custom handler, or if you want to
  19. // access properties on the request object before or after sending the request. If
  20. // you just want the service response, call the BatchCheckLayerAvailability method directly
  21. // instead.
  22. //
  23. // Note: You must call the "Send" method on the returned request object in order
  24. // to execute the request.
  25. //
  26. // // Example sending a request using the BatchCheckLayerAvailabilityRequest method.
  27. // req, resp := client.BatchCheckLayerAvailabilityRequest(params)
  28. //
  29. // err := req.Send()
  30. // if err == nil { // resp is now filled
  31. // fmt.Println(resp)
  32. // }
  33. //
  34. func (c *ECR) BatchCheckLayerAvailabilityRequest(input *BatchCheckLayerAvailabilityInput) (req *request.Request, output *BatchCheckLayerAvailabilityOutput) {
  35. op := &request.Operation{
  36. Name: opBatchCheckLayerAvailability,
  37. HTTPMethod: "POST",
  38. HTTPPath: "/",
  39. }
  40. if input == nil {
  41. input = &BatchCheckLayerAvailabilityInput{}
  42. }
  43. req = c.newRequest(op, input, output)
  44. output = &BatchCheckLayerAvailabilityOutput{}
  45. req.Data = output
  46. return
  47. }
  48. // BatchCheckLayerAvailability API operation for Amazon EC2 Container Registry.
  49. //
  50. // Check the availability of multiple image layers in a specified registry and
  51. // repository.
  52. //
  53. // This operation is used by the Amazon ECR proxy, and it is not intended for
  54. // general use by customers. Use the docker CLI to pull, tag, and push images.
  55. //
  56. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  57. // with awserr.Error's Code and Message methods to get detailed information about
  58. // the error.
  59. //
  60. // See the AWS API reference guide for Amazon EC2 Container Registry's
  61. // API operation BatchCheckLayerAvailability for usage and error information.
  62. //
  63. // Returned Error Codes:
  64. // * RepositoryNotFoundException
  65. // The specified repository could not be found. Check the spelling of the specified
  66. // repository and ensure that you are performing operations on the correct registry.
  67. //
  68. // * InvalidParameterException
  69. // The specified parameter is invalid. Review the available parameters for the
  70. // API request.
  71. //
  72. // * ServerException
  73. // These errors are usually caused by a server-side issue.
  74. //
  75. func (c *ECR) BatchCheckLayerAvailability(input *BatchCheckLayerAvailabilityInput) (*BatchCheckLayerAvailabilityOutput, error) {
  76. req, out := c.BatchCheckLayerAvailabilityRequest(input)
  77. err := req.Send()
  78. return out, err
  79. }
  80. const opBatchDeleteImage = "BatchDeleteImage"
  81. // BatchDeleteImageRequest generates a "aws/request.Request" representing the
  82. // client's request for the BatchDeleteImage operation. The "output" return
  83. // value can be used to capture response data after the request's "Send" method
  84. // is called.
  85. //
  86. // See BatchDeleteImage for usage and error information.
  87. //
  88. // Creating a request object using this method should be used when you want to inject
  89. // custom logic into the request's lifecycle using a custom handler, or if you want to
  90. // access properties on the request object before or after sending the request. If
  91. // you just want the service response, call the BatchDeleteImage method directly
  92. // instead.
  93. //
  94. // Note: You must call the "Send" method on the returned request object in order
  95. // to execute the request.
  96. //
  97. // // Example sending a request using the BatchDeleteImageRequest method.
  98. // req, resp := client.BatchDeleteImageRequest(params)
  99. //
  100. // err := req.Send()
  101. // if err == nil { // resp is now filled
  102. // fmt.Println(resp)
  103. // }
  104. //
  105. func (c *ECR) BatchDeleteImageRequest(input *BatchDeleteImageInput) (req *request.Request, output *BatchDeleteImageOutput) {
  106. op := &request.Operation{
  107. Name: opBatchDeleteImage,
  108. HTTPMethod: "POST",
  109. HTTPPath: "/",
  110. }
  111. if input == nil {
  112. input = &BatchDeleteImageInput{}
  113. }
  114. req = c.newRequest(op, input, output)
  115. output = &BatchDeleteImageOutput{}
  116. req.Data = output
  117. return
  118. }
  119. // BatchDeleteImage API operation for Amazon EC2 Container Registry.
  120. //
  121. // Deletes a list of specified images within a specified repository. Images
  122. // are specified with either imageTag or imageDigest.
  123. //
  124. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  125. // with awserr.Error's Code and Message methods to get detailed information about
  126. // the error.
  127. //
  128. // See the AWS API reference guide for Amazon EC2 Container Registry's
  129. // API operation BatchDeleteImage for usage and error information.
  130. //
  131. // Returned Error Codes:
  132. // * ServerException
  133. // These errors are usually caused by a server-side issue.
  134. //
  135. // * InvalidParameterException
  136. // The specified parameter is invalid. Review the available parameters for the
  137. // API request.
  138. //
  139. // * RepositoryNotFoundException
  140. // The specified repository could not be found. Check the spelling of the specified
  141. // repository and ensure that you are performing operations on the correct registry.
  142. //
  143. func (c *ECR) BatchDeleteImage(input *BatchDeleteImageInput) (*BatchDeleteImageOutput, error) {
  144. req, out := c.BatchDeleteImageRequest(input)
  145. err := req.Send()
  146. return out, err
  147. }
  148. const opBatchGetImage = "BatchGetImage"
  149. // BatchGetImageRequest generates a "aws/request.Request" representing the
  150. // client's request for the BatchGetImage operation. The "output" return
  151. // value can be used to capture response data after the request's "Send" method
  152. // is called.
  153. //
  154. // See BatchGetImage for usage and error information.
  155. //
  156. // Creating a request object using this method should be used when you want to inject
  157. // custom logic into the request's lifecycle using a custom handler, or if you want to
  158. // access properties on the request object before or after sending the request. If
  159. // you just want the service response, call the BatchGetImage method directly
  160. // instead.
  161. //
  162. // Note: You must call the "Send" method on the returned request object in order
  163. // to execute the request.
  164. //
  165. // // Example sending a request using the BatchGetImageRequest method.
  166. // req, resp := client.BatchGetImageRequest(params)
  167. //
  168. // err := req.Send()
  169. // if err == nil { // resp is now filled
  170. // fmt.Println(resp)
  171. // }
  172. //
  173. func (c *ECR) BatchGetImageRequest(input *BatchGetImageInput) (req *request.Request, output *BatchGetImageOutput) {
  174. op := &request.Operation{
  175. Name: opBatchGetImage,
  176. HTTPMethod: "POST",
  177. HTTPPath: "/",
  178. }
  179. if input == nil {
  180. input = &BatchGetImageInput{}
  181. }
  182. req = c.newRequest(op, input, output)
  183. output = &BatchGetImageOutput{}
  184. req.Data = output
  185. return
  186. }
  187. // BatchGetImage API operation for Amazon EC2 Container Registry.
  188. //
  189. // Gets detailed information for specified images within a specified repository.
  190. // Images are specified with either imageTag or imageDigest.
  191. //
  192. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  193. // with awserr.Error's Code and Message methods to get detailed information about
  194. // the error.
  195. //
  196. // See the AWS API reference guide for Amazon EC2 Container Registry's
  197. // API operation BatchGetImage for usage and error information.
  198. //
  199. // Returned Error Codes:
  200. // * ServerException
  201. // These errors are usually caused by a server-side issue.
  202. //
  203. // * InvalidParameterException
  204. // The specified parameter is invalid. Review the available parameters for the
  205. // API request.
  206. //
  207. // * RepositoryNotFoundException
  208. // The specified repository could not be found. Check the spelling of the specified
  209. // repository and ensure that you are performing operations on the correct registry.
  210. //
  211. func (c *ECR) BatchGetImage(input *BatchGetImageInput) (*BatchGetImageOutput, error) {
  212. req, out := c.BatchGetImageRequest(input)
  213. err := req.Send()
  214. return out, err
  215. }
  216. const opCompleteLayerUpload = "CompleteLayerUpload"
  217. // CompleteLayerUploadRequest generates a "aws/request.Request" representing the
  218. // client's request for the CompleteLayerUpload operation. The "output" return
  219. // value can be used to capture response data after the request's "Send" method
  220. // is called.
  221. //
  222. // See CompleteLayerUpload for usage and error information.
  223. //
  224. // Creating a request object using this method should be used when you want to inject
  225. // custom logic into the request's lifecycle using a custom handler, or if you want to
  226. // access properties on the request object before or after sending the request. If
  227. // you just want the service response, call the CompleteLayerUpload method directly
  228. // instead.
  229. //
  230. // Note: You must call the "Send" method on the returned request object in order
  231. // to execute the request.
  232. //
  233. // // Example sending a request using the CompleteLayerUploadRequest method.
  234. // req, resp := client.CompleteLayerUploadRequest(params)
  235. //
  236. // err := req.Send()
  237. // if err == nil { // resp is now filled
  238. // fmt.Println(resp)
  239. // }
  240. //
  241. func (c *ECR) CompleteLayerUploadRequest(input *CompleteLayerUploadInput) (req *request.Request, output *CompleteLayerUploadOutput) {
  242. op := &request.Operation{
  243. Name: opCompleteLayerUpload,
  244. HTTPMethod: "POST",
  245. HTTPPath: "/",
  246. }
  247. if input == nil {
  248. input = &CompleteLayerUploadInput{}
  249. }
  250. req = c.newRequest(op, input, output)
  251. output = &CompleteLayerUploadOutput{}
  252. req.Data = output
  253. return
  254. }
  255. // CompleteLayerUpload API operation for Amazon EC2 Container Registry.
  256. //
  257. // Inform Amazon ECR that the image layer upload for a specified registry, repository
  258. // name, and upload ID, has completed. You can optionally provide a sha256 digest
  259. // of the image layer for data validation purposes.
  260. //
  261. // This operation is used by the Amazon ECR proxy, and it is not intended for
  262. // general use by customers. Use the docker CLI to pull, tag, and push images.
  263. //
  264. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  265. // with awserr.Error's Code and Message methods to get detailed information about
  266. // the error.
  267. //
  268. // See the AWS API reference guide for Amazon EC2 Container Registry's
  269. // API operation CompleteLayerUpload for usage and error information.
  270. //
  271. // Returned Error Codes:
  272. // * ServerException
  273. // These errors are usually caused by a server-side issue.
  274. //
  275. // * InvalidParameterException
  276. // The specified parameter is invalid. Review the available parameters for the
  277. // API request.
  278. //
  279. // * RepositoryNotFoundException
  280. // The specified repository could not be found. Check the spelling of the specified
  281. // repository and ensure that you are performing operations on the correct registry.
  282. //
  283. // * UploadNotFoundException
  284. // The upload could not be found, or the specified upload id is not valid for
  285. // this repository.
  286. //
  287. // * InvalidLayerException
  288. // The layer digest calculation performed by Amazon ECR upon receipt of the
  289. // image layer does not match the digest specified.
  290. //
  291. // * LayerPartTooSmallException
  292. // Layer parts must be at least 5 MiB in size.
  293. //
  294. // * LayerAlreadyExistsException
  295. // The image layer already exists in the associated repository.
  296. //
  297. // * EmptyUploadException
  298. // The specified layer upload does not contain any layer parts.
  299. //
  300. func (c *ECR) CompleteLayerUpload(input *CompleteLayerUploadInput) (*CompleteLayerUploadOutput, error) {
  301. req, out := c.CompleteLayerUploadRequest(input)
  302. err := req.Send()
  303. return out, err
  304. }
  305. const opCreateRepository = "CreateRepository"
  306. // CreateRepositoryRequest generates a "aws/request.Request" representing the
  307. // client's request for the CreateRepository operation. The "output" return
  308. // value can be used to capture response data after the request's "Send" method
  309. // is called.
  310. //
  311. // See CreateRepository for usage and error information.
  312. //
  313. // Creating a request object using this method should be used when you want to inject
  314. // custom logic into the request's lifecycle using a custom handler, or if you want to
  315. // access properties on the request object before or after sending the request. If
  316. // you just want the service response, call the CreateRepository method directly
  317. // instead.
  318. //
  319. // Note: You must call the "Send" method on the returned request object in order
  320. // to execute the request.
  321. //
  322. // // Example sending a request using the CreateRepositoryRequest method.
  323. // req, resp := client.CreateRepositoryRequest(params)
  324. //
  325. // err := req.Send()
  326. // if err == nil { // resp is now filled
  327. // fmt.Println(resp)
  328. // }
  329. //
  330. func (c *ECR) CreateRepositoryRequest(input *CreateRepositoryInput) (req *request.Request, output *CreateRepositoryOutput) {
  331. op := &request.Operation{
  332. Name: opCreateRepository,
  333. HTTPMethod: "POST",
  334. HTTPPath: "/",
  335. }
  336. if input == nil {
  337. input = &CreateRepositoryInput{}
  338. }
  339. req = c.newRequest(op, input, output)
  340. output = &CreateRepositoryOutput{}
  341. req.Data = output
  342. return
  343. }
  344. // CreateRepository API operation for Amazon EC2 Container Registry.
  345. //
  346. // Creates an image repository.
  347. //
  348. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  349. // with awserr.Error's Code and Message methods to get detailed information about
  350. // the error.
  351. //
  352. // See the AWS API reference guide for Amazon EC2 Container Registry's
  353. // API operation CreateRepository for usage and error information.
  354. //
  355. // Returned Error Codes:
  356. // * ServerException
  357. // These errors are usually caused by a server-side issue.
  358. //
  359. // * InvalidParameterException
  360. // The specified parameter is invalid. Review the available parameters for the
  361. // API request.
  362. //
  363. // * RepositoryAlreadyExistsException
  364. // The specified repository already exists in the specified registry.
  365. //
  366. // * LimitExceededException
  367. // The operation did not succeed because it would have exceeded a service limit
  368. // for your account. For more information, see Amazon ECR Default Service Limits
  369. // (http://docs.aws.amazon.com/AmazonECR/latest/userguide/service_limits.html)
  370. // in the Amazon EC2 Container Registry User Guide.
  371. //
  372. func (c *ECR) CreateRepository(input *CreateRepositoryInput) (*CreateRepositoryOutput, error) {
  373. req, out := c.CreateRepositoryRequest(input)
  374. err := req.Send()
  375. return out, err
  376. }
  377. const opDeleteRepository = "DeleteRepository"
  378. // DeleteRepositoryRequest generates a "aws/request.Request" representing the
  379. // client's request for the DeleteRepository operation. The "output" return
  380. // value can be used to capture response data after the request's "Send" method
  381. // is called.
  382. //
  383. // See DeleteRepository for usage and error information.
  384. //
  385. // Creating a request object using this method should be used when you want to inject
  386. // custom logic into the request's lifecycle using a custom handler, or if you want to
  387. // access properties on the request object before or after sending the request. If
  388. // you just want the service response, call the DeleteRepository method directly
  389. // instead.
  390. //
  391. // Note: You must call the "Send" method on the returned request object in order
  392. // to execute the request.
  393. //
  394. // // Example sending a request using the DeleteRepositoryRequest method.
  395. // req, resp := client.DeleteRepositoryRequest(params)
  396. //
  397. // err := req.Send()
  398. // if err == nil { // resp is now filled
  399. // fmt.Println(resp)
  400. // }
  401. //
  402. func (c *ECR) DeleteRepositoryRequest(input *DeleteRepositoryInput) (req *request.Request, output *DeleteRepositoryOutput) {
  403. op := &request.Operation{
  404. Name: opDeleteRepository,
  405. HTTPMethod: "POST",
  406. HTTPPath: "/",
  407. }
  408. if input == nil {
  409. input = &DeleteRepositoryInput{}
  410. }
  411. req = c.newRequest(op, input, output)
  412. output = &DeleteRepositoryOutput{}
  413. req.Data = output
  414. return
  415. }
  416. // DeleteRepository API operation for Amazon EC2 Container Registry.
  417. //
  418. // Deletes an existing image repository. If a repository contains images, you
  419. // must use the force option to delete it.
  420. //
  421. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  422. // with awserr.Error's Code and Message methods to get detailed information about
  423. // the error.
  424. //
  425. // See the AWS API reference guide for Amazon EC2 Container Registry's
  426. // API operation DeleteRepository for usage and error information.
  427. //
  428. // Returned Error Codes:
  429. // * ServerException
  430. // These errors are usually caused by a server-side issue.
  431. //
  432. // * InvalidParameterException
  433. // The specified parameter is invalid. Review the available parameters for the
  434. // API request.
  435. //
  436. // * RepositoryNotFoundException
  437. // The specified repository could not be found. Check the spelling of the specified
  438. // repository and ensure that you are performing operations on the correct registry.
  439. //
  440. // * RepositoryNotEmptyException
  441. // The specified repository contains images. To delete a repository that contains
  442. // images, you must force the deletion with the force parameter.
  443. //
  444. func (c *ECR) DeleteRepository(input *DeleteRepositoryInput) (*DeleteRepositoryOutput, error) {
  445. req, out := c.DeleteRepositoryRequest(input)
  446. err := req.Send()
  447. return out, err
  448. }
  449. const opDeleteRepositoryPolicy = "DeleteRepositoryPolicy"
  450. // DeleteRepositoryPolicyRequest generates a "aws/request.Request" representing the
  451. // client's request for the DeleteRepositoryPolicy operation. The "output" return
  452. // value can be used to capture response data after the request's "Send" method
  453. // is called.
  454. //
  455. // See DeleteRepositoryPolicy for usage and error information.
  456. //
  457. // Creating a request object using this method should be used when you want to inject
  458. // custom logic into the request's lifecycle using a custom handler, or if you want to
  459. // access properties on the request object before or after sending the request. If
  460. // you just want the service response, call the DeleteRepositoryPolicy method directly
  461. // instead.
  462. //
  463. // Note: You must call the "Send" method on the returned request object in order
  464. // to execute the request.
  465. //
  466. // // Example sending a request using the DeleteRepositoryPolicyRequest method.
  467. // req, resp := client.DeleteRepositoryPolicyRequest(params)
  468. //
  469. // err := req.Send()
  470. // if err == nil { // resp is now filled
  471. // fmt.Println(resp)
  472. // }
  473. //
  474. func (c *ECR) DeleteRepositoryPolicyRequest(input *DeleteRepositoryPolicyInput) (req *request.Request, output *DeleteRepositoryPolicyOutput) {
  475. op := &request.Operation{
  476. Name: opDeleteRepositoryPolicy,
  477. HTTPMethod: "POST",
  478. HTTPPath: "/",
  479. }
  480. if input == nil {
  481. input = &DeleteRepositoryPolicyInput{}
  482. }
  483. req = c.newRequest(op, input, output)
  484. output = &DeleteRepositoryPolicyOutput{}
  485. req.Data = output
  486. return
  487. }
  488. // DeleteRepositoryPolicy API operation for Amazon EC2 Container Registry.
  489. //
  490. // Deletes the repository policy from a specified repository.
  491. //
  492. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  493. // with awserr.Error's Code and Message methods to get detailed information about
  494. // the error.
  495. //
  496. // See the AWS API reference guide for Amazon EC2 Container Registry's
  497. // API operation DeleteRepositoryPolicy for usage and error information.
  498. //
  499. // Returned Error Codes:
  500. // * ServerException
  501. // These errors are usually caused by a server-side issue.
  502. //
  503. // * InvalidParameterException
  504. // The specified parameter is invalid. Review the available parameters for the
  505. // API request.
  506. //
  507. // * RepositoryNotFoundException
  508. // The specified repository could not be found. Check the spelling of the specified
  509. // repository and ensure that you are performing operations on the correct registry.
  510. //
  511. // * RepositoryPolicyNotFoundException
  512. // The specified repository and registry combination does not have an associated
  513. // repository policy.
  514. //
  515. func (c *ECR) DeleteRepositoryPolicy(input *DeleteRepositoryPolicyInput) (*DeleteRepositoryPolicyOutput, error) {
  516. req, out := c.DeleteRepositoryPolicyRequest(input)
  517. err := req.Send()
  518. return out, err
  519. }
  520. const opDescribeImages = "DescribeImages"
  521. // DescribeImagesRequest generates a "aws/request.Request" representing the
  522. // client's request for the DescribeImages operation. The "output" return
  523. // value can be used to capture response data after the request's "Send" method
  524. // is called.
  525. //
  526. // See DescribeImages for usage and error information.
  527. //
  528. // Creating a request object using this method should be used when you want to inject
  529. // custom logic into the request's lifecycle using a custom handler, or if you want to
  530. // access properties on the request object before or after sending the request. If
  531. // you just want the service response, call the DescribeImages method directly
  532. // instead.
  533. //
  534. // Note: You must call the "Send" method on the returned request object in order
  535. // to execute the request.
  536. //
  537. // // Example sending a request using the DescribeImagesRequest method.
  538. // req, resp := client.DescribeImagesRequest(params)
  539. //
  540. // err := req.Send()
  541. // if err == nil { // resp is now filled
  542. // fmt.Println(resp)
  543. // }
  544. //
  545. func (c *ECR) DescribeImagesRequest(input *DescribeImagesInput) (req *request.Request, output *DescribeImagesOutput) {
  546. op := &request.Operation{
  547. Name: opDescribeImages,
  548. HTTPMethod: "POST",
  549. HTTPPath: "/",
  550. }
  551. if input == nil {
  552. input = &DescribeImagesInput{}
  553. }
  554. req = c.newRequest(op, input, output)
  555. output = &DescribeImagesOutput{}
  556. req.Data = output
  557. return
  558. }
  559. // DescribeImages API operation for Amazon EC2 Container Registry.
  560. //
  561. // Returns metadata about the images in a repository, including image size and
  562. // creation date.
  563. //
  564. // Beginning with Docker version 1.9, the Docker client compresses image layers
  565. // before pushing them to a V2 Docker registry. The output of the docker images
  566. // command shows the uncompressed image size, so it may return a larger image
  567. // size than the image sizes returned by DescribeImages.
  568. //
  569. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  570. // with awserr.Error's Code and Message methods to get detailed information about
  571. // the error.
  572. //
  573. // See the AWS API reference guide for Amazon EC2 Container Registry's
  574. // API operation DescribeImages for usage and error information.
  575. //
  576. // Returned Error Codes:
  577. // * ServerException
  578. // These errors are usually caused by a server-side issue.
  579. //
  580. // * InvalidParameterException
  581. // The specified parameter is invalid. Review the available parameters for the
  582. // API request.
  583. //
  584. // * RepositoryNotFoundException
  585. // The specified repository could not be found. Check the spelling of the specified
  586. // repository and ensure that you are performing operations on the correct registry.
  587. //
  588. // * ImageNotFoundException
  589. // The image requested does not exist in the specified repository.
  590. //
  591. func (c *ECR) DescribeImages(input *DescribeImagesInput) (*DescribeImagesOutput, error) {
  592. req, out := c.DescribeImagesRequest(input)
  593. err := req.Send()
  594. return out, err
  595. }
  596. const opDescribeRepositories = "DescribeRepositories"
  597. // DescribeRepositoriesRequest generates a "aws/request.Request" representing the
  598. // client's request for the DescribeRepositories operation. The "output" return
  599. // value can be used to capture response data after the request's "Send" method
  600. // is called.
  601. //
  602. // See DescribeRepositories for usage and error information.
  603. //
  604. // Creating a request object using this method should be used when you want to inject
  605. // custom logic into the request's lifecycle using a custom handler, or if you want to
  606. // access properties on the request object before or after sending the request. If
  607. // you just want the service response, call the DescribeRepositories method directly
  608. // instead.
  609. //
  610. // Note: You must call the "Send" method on the returned request object in order
  611. // to execute the request.
  612. //
  613. // // Example sending a request using the DescribeRepositoriesRequest method.
  614. // req, resp := client.DescribeRepositoriesRequest(params)
  615. //
  616. // err := req.Send()
  617. // if err == nil { // resp is now filled
  618. // fmt.Println(resp)
  619. // }
  620. //
  621. func (c *ECR) DescribeRepositoriesRequest(input *DescribeRepositoriesInput) (req *request.Request, output *DescribeRepositoriesOutput) {
  622. op := &request.Operation{
  623. Name: opDescribeRepositories,
  624. HTTPMethod: "POST",
  625. HTTPPath: "/",
  626. }
  627. if input == nil {
  628. input = &DescribeRepositoriesInput{}
  629. }
  630. req = c.newRequest(op, input, output)
  631. output = &DescribeRepositoriesOutput{}
  632. req.Data = output
  633. return
  634. }
  635. // DescribeRepositories API operation for Amazon EC2 Container Registry.
  636. //
  637. // Describes image repositories in a registry.
  638. //
  639. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  640. // with awserr.Error's Code and Message methods to get detailed information about
  641. // the error.
  642. //
  643. // See the AWS API reference guide for Amazon EC2 Container Registry's
  644. // API operation DescribeRepositories for usage and error information.
  645. //
  646. // Returned Error Codes:
  647. // * ServerException
  648. // These errors are usually caused by a server-side issue.
  649. //
  650. // * InvalidParameterException
  651. // The specified parameter is invalid. Review the available parameters for the
  652. // API request.
  653. //
  654. // * RepositoryNotFoundException
  655. // The specified repository could not be found. Check the spelling of the specified
  656. // repository and ensure that you are performing operations on the correct registry.
  657. //
  658. func (c *ECR) DescribeRepositories(input *DescribeRepositoriesInput) (*DescribeRepositoriesOutput, error) {
  659. req, out := c.DescribeRepositoriesRequest(input)
  660. err := req.Send()
  661. return out, err
  662. }
  663. const opGetAuthorizationToken = "GetAuthorizationToken"
  664. // GetAuthorizationTokenRequest generates a "aws/request.Request" representing the
  665. // client's request for the GetAuthorizationToken operation. The "output" return
  666. // value can be used to capture response data after the request's "Send" method
  667. // is called.
  668. //
  669. // See GetAuthorizationToken for usage and error information.
  670. //
  671. // Creating a request object using this method should be used when you want to inject
  672. // custom logic into the request's lifecycle using a custom handler, or if you want to
  673. // access properties on the request object before or after sending the request. If
  674. // you just want the service response, call the GetAuthorizationToken method directly
  675. // instead.
  676. //
  677. // Note: You must call the "Send" method on the returned request object in order
  678. // to execute the request.
  679. //
  680. // // Example sending a request using the GetAuthorizationTokenRequest method.
  681. // req, resp := client.GetAuthorizationTokenRequest(params)
  682. //
  683. // err := req.Send()
  684. // if err == nil { // resp is now filled
  685. // fmt.Println(resp)
  686. // }
  687. //
  688. func (c *ECR) GetAuthorizationTokenRequest(input *GetAuthorizationTokenInput) (req *request.Request, output *GetAuthorizationTokenOutput) {
  689. op := &request.Operation{
  690. Name: opGetAuthorizationToken,
  691. HTTPMethod: "POST",
  692. HTTPPath: "/",
  693. }
  694. if input == nil {
  695. input = &GetAuthorizationTokenInput{}
  696. }
  697. req = c.newRequest(op, input, output)
  698. output = &GetAuthorizationTokenOutput{}
  699. req.Data = output
  700. return
  701. }
  702. // GetAuthorizationToken API operation for Amazon EC2 Container Registry.
  703. //
  704. // Retrieves a token that is valid for a specified registry for 12 hours. This
  705. // command allows you to use the docker CLI to push and pull images with Amazon
  706. // ECR. If you do not specify a registry, the default registry is assumed.
  707. //
  708. // The authorizationToken returned for each registry specified is a base64 encoded
  709. // string that can be decoded and used in a docker login command to authenticate
  710. // to a registry. The AWS CLI offers an aws ecr get-login command that simplifies
  711. // the login process.
  712. //
  713. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  714. // with awserr.Error's Code and Message methods to get detailed information about
  715. // the error.
  716. //
  717. // See the AWS API reference guide for Amazon EC2 Container Registry's
  718. // API operation GetAuthorizationToken for usage and error information.
  719. //
  720. // Returned Error Codes:
  721. // * ServerException
  722. // These errors are usually caused by a server-side issue.
  723. //
  724. // * InvalidParameterException
  725. // The specified parameter is invalid. Review the available parameters for the
  726. // API request.
  727. //
  728. func (c *ECR) GetAuthorizationToken(input *GetAuthorizationTokenInput) (*GetAuthorizationTokenOutput, error) {
  729. req, out := c.GetAuthorizationTokenRequest(input)
  730. err := req.Send()
  731. return out, err
  732. }
  733. const opGetDownloadUrlForLayer = "GetDownloadUrlForLayer"
  734. // GetDownloadUrlForLayerRequest generates a "aws/request.Request" representing the
  735. // client's request for the GetDownloadUrlForLayer operation. The "output" return
  736. // value can be used to capture response data after the request's "Send" method
  737. // is called.
  738. //
  739. // See GetDownloadUrlForLayer for usage and error information.
  740. //
  741. // Creating a request object using this method should be used when you want to inject
  742. // custom logic into the request's lifecycle using a custom handler, or if you want to
  743. // access properties on the request object before or after sending the request. If
  744. // you just want the service response, call the GetDownloadUrlForLayer method directly
  745. // instead.
  746. //
  747. // Note: You must call the "Send" method on the returned request object in order
  748. // to execute the request.
  749. //
  750. // // Example sending a request using the GetDownloadUrlForLayerRequest method.
  751. // req, resp := client.GetDownloadUrlForLayerRequest(params)
  752. //
  753. // err := req.Send()
  754. // if err == nil { // resp is now filled
  755. // fmt.Println(resp)
  756. // }
  757. //
  758. func (c *ECR) GetDownloadUrlForLayerRequest(input *GetDownloadUrlForLayerInput) (req *request.Request, output *GetDownloadUrlForLayerOutput) {
  759. op := &request.Operation{
  760. Name: opGetDownloadUrlForLayer,
  761. HTTPMethod: "POST",
  762. HTTPPath: "/",
  763. }
  764. if input == nil {
  765. input = &GetDownloadUrlForLayerInput{}
  766. }
  767. req = c.newRequest(op, input, output)
  768. output = &GetDownloadUrlForLayerOutput{}
  769. req.Data = output
  770. return
  771. }
  772. // GetDownloadUrlForLayer API operation for Amazon EC2 Container Registry.
  773. //
  774. // Retrieves the pre-signed Amazon S3 download URL corresponding to an image
  775. // layer. You can only get URLs for image layers that are referenced in an image.
  776. //
  777. // This operation is used by the Amazon ECR proxy, and it is not intended for
  778. // general use by customers. Use the docker CLI to pull, tag, and push images.
  779. //
  780. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  781. // with awserr.Error's Code and Message methods to get detailed information about
  782. // the error.
  783. //
  784. // See the AWS API reference guide for Amazon EC2 Container Registry's
  785. // API operation GetDownloadUrlForLayer for usage and error information.
  786. //
  787. // Returned Error Codes:
  788. // * ServerException
  789. // These errors are usually caused by a server-side issue.
  790. //
  791. // * InvalidParameterException
  792. // The specified parameter is invalid. Review the available parameters for the
  793. // API request.
  794. //
  795. // * LayersNotFoundException
  796. // The specified layers could not be found, or the specified layer is not valid
  797. // for this repository.
  798. //
  799. // * LayerInaccessibleException
  800. // The specified layer is not available because it is not associated with an
  801. // image. Unassociated image layers may be cleaned up at any time.
  802. //
  803. // * RepositoryNotFoundException
  804. // The specified repository could not be found. Check the spelling of the specified
  805. // repository and ensure that you are performing operations on the correct registry.
  806. //
  807. func (c *ECR) GetDownloadUrlForLayer(input *GetDownloadUrlForLayerInput) (*GetDownloadUrlForLayerOutput, error) {
  808. req, out := c.GetDownloadUrlForLayerRequest(input)
  809. err := req.Send()
  810. return out, err
  811. }
  812. const opGetRepositoryPolicy = "GetRepositoryPolicy"
  813. // GetRepositoryPolicyRequest generates a "aws/request.Request" representing the
  814. // client's request for the GetRepositoryPolicy operation. The "output" return
  815. // value can be used to capture response data after the request's "Send" method
  816. // is called.
  817. //
  818. // See GetRepositoryPolicy for usage and error information.
  819. //
  820. // Creating a request object using this method should be used when you want to inject
  821. // custom logic into the request's lifecycle using a custom handler, or if you want to
  822. // access properties on the request object before or after sending the request. If
  823. // you just want the service response, call the GetRepositoryPolicy method directly
  824. // instead.
  825. //
  826. // Note: You must call the "Send" method on the returned request object in order
  827. // to execute the request.
  828. //
  829. // // Example sending a request using the GetRepositoryPolicyRequest method.
  830. // req, resp := client.GetRepositoryPolicyRequest(params)
  831. //
  832. // err := req.Send()
  833. // if err == nil { // resp is now filled
  834. // fmt.Println(resp)
  835. // }
  836. //
  837. func (c *ECR) GetRepositoryPolicyRequest(input *GetRepositoryPolicyInput) (req *request.Request, output *GetRepositoryPolicyOutput) {
  838. op := &request.Operation{
  839. Name: opGetRepositoryPolicy,
  840. HTTPMethod: "POST",
  841. HTTPPath: "/",
  842. }
  843. if input == nil {
  844. input = &GetRepositoryPolicyInput{}
  845. }
  846. req = c.newRequest(op, input, output)
  847. output = &GetRepositoryPolicyOutput{}
  848. req.Data = output
  849. return
  850. }
  851. // GetRepositoryPolicy API operation for Amazon EC2 Container Registry.
  852. //
  853. // Retrieves the repository policy for a specified repository.
  854. //
  855. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  856. // with awserr.Error's Code and Message methods to get detailed information about
  857. // the error.
  858. //
  859. // See the AWS API reference guide for Amazon EC2 Container Registry's
  860. // API operation GetRepositoryPolicy for usage and error information.
  861. //
  862. // Returned Error Codes:
  863. // * ServerException
  864. // These errors are usually caused by a server-side issue.
  865. //
  866. // * InvalidParameterException
  867. // The specified parameter is invalid. Review the available parameters for the
  868. // API request.
  869. //
  870. // * RepositoryNotFoundException
  871. // The specified repository could not be found. Check the spelling of the specified
  872. // repository and ensure that you are performing operations on the correct registry.
  873. //
  874. // * RepositoryPolicyNotFoundException
  875. // The specified repository and registry combination does not have an associated
  876. // repository policy.
  877. //
  878. func (c *ECR) GetRepositoryPolicy(input *GetRepositoryPolicyInput) (*GetRepositoryPolicyOutput, error) {
  879. req, out := c.GetRepositoryPolicyRequest(input)
  880. err := req.Send()
  881. return out, err
  882. }
  883. const opInitiateLayerUpload = "InitiateLayerUpload"
  884. // InitiateLayerUploadRequest generates a "aws/request.Request" representing the
  885. // client's request for the InitiateLayerUpload operation. The "output" return
  886. // value can be used to capture response data after the request's "Send" method
  887. // is called.
  888. //
  889. // See InitiateLayerUpload for usage and error information.
  890. //
  891. // Creating a request object using this method should be used when you want to inject
  892. // custom logic into the request's lifecycle using a custom handler, or if you want to
  893. // access properties on the request object before or after sending the request. If
  894. // you just want the service response, call the InitiateLayerUpload method directly
  895. // instead.
  896. //
  897. // Note: You must call the "Send" method on the returned request object in order
  898. // to execute the request.
  899. //
  900. // // Example sending a request using the InitiateLayerUploadRequest method.
  901. // req, resp := client.InitiateLayerUploadRequest(params)
  902. //
  903. // err := req.Send()
  904. // if err == nil { // resp is now filled
  905. // fmt.Println(resp)
  906. // }
  907. //
  908. func (c *ECR) InitiateLayerUploadRequest(input *InitiateLayerUploadInput) (req *request.Request, output *InitiateLayerUploadOutput) {
  909. op := &request.Operation{
  910. Name: opInitiateLayerUpload,
  911. HTTPMethod: "POST",
  912. HTTPPath: "/",
  913. }
  914. if input == nil {
  915. input = &InitiateLayerUploadInput{}
  916. }
  917. req = c.newRequest(op, input, output)
  918. output = &InitiateLayerUploadOutput{}
  919. req.Data = output
  920. return
  921. }
  922. // InitiateLayerUpload API operation for Amazon EC2 Container Registry.
  923. //
  924. // Notify Amazon ECR that you intend to upload an image layer.
  925. //
  926. // This operation is used by the Amazon ECR proxy, and it is not intended for
  927. // general use by customers. Use the docker CLI to pull, tag, and push images.
  928. //
  929. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  930. // with awserr.Error's Code and Message methods to get detailed information about
  931. // the error.
  932. //
  933. // See the AWS API reference guide for Amazon EC2 Container Registry's
  934. // API operation InitiateLayerUpload for usage and error information.
  935. //
  936. // Returned Error Codes:
  937. // * ServerException
  938. // These errors are usually caused by a server-side issue.
  939. //
  940. // * InvalidParameterException
  941. // The specified parameter is invalid. Review the available parameters for the
  942. // API request.
  943. //
  944. // * RepositoryNotFoundException
  945. // The specified repository could not be found. Check the spelling of the specified
  946. // repository and ensure that you are performing operations on the correct registry.
  947. //
  948. func (c *ECR) InitiateLayerUpload(input *InitiateLayerUploadInput) (*InitiateLayerUploadOutput, error) {
  949. req, out := c.InitiateLayerUploadRequest(input)
  950. err := req.Send()
  951. return out, err
  952. }
  953. const opListImages = "ListImages"
  954. // ListImagesRequest generates a "aws/request.Request" representing the
  955. // client's request for the ListImages operation. The "output" return
  956. // value can be used to capture response data after the request's "Send" method
  957. // is called.
  958. //
  959. // See ListImages for usage and error information.
  960. //
  961. // Creating a request object using this method should be used when you want to inject
  962. // custom logic into the request's lifecycle using a custom handler, or if you want to
  963. // access properties on the request object before or after sending the request. If
  964. // you just want the service response, call the ListImages method directly
  965. // instead.
  966. //
  967. // Note: You must call the "Send" method on the returned request object in order
  968. // to execute the request.
  969. //
  970. // // Example sending a request using the ListImagesRequest method.
  971. // req, resp := client.ListImagesRequest(params)
  972. //
  973. // err := req.Send()
  974. // if err == nil { // resp is now filled
  975. // fmt.Println(resp)
  976. // }
  977. //
  978. func (c *ECR) ListImagesRequest(input *ListImagesInput) (req *request.Request, output *ListImagesOutput) {
  979. op := &request.Operation{
  980. Name: opListImages,
  981. HTTPMethod: "POST",
  982. HTTPPath: "/",
  983. }
  984. if input == nil {
  985. input = &ListImagesInput{}
  986. }
  987. req = c.newRequest(op, input, output)
  988. output = &ListImagesOutput{}
  989. req.Data = output
  990. return
  991. }
  992. // ListImages API operation for Amazon EC2 Container Registry.
  993. //
  994. // Lists all the image IDs for a given repository.
  995. //
  996. // You can filter images based on whether or not they are tagged by setting
  997. // the tagStatus parameter to TAGGED or UNTAGGED. For example, you can filter
  998. // your results to return only UNTAGGED images and then pipe that result to
  999. // a BatchDeleteImage operation to delete them. Or, you can filter your results
  1000. // to return only TAGGED images to list all of the tags in your repository.
  1001. //
  1002. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1003. // with awserr.Error's Code and Message methods to get detailed information about
  1004. // the error.
  1005. //
  1006. // See the AWS API reference guide for Amazon EC2 Container Registry's
  1007. // API operation ListImages for usage and error information.
  1008. //
  1009. // Returned Error Codes:
  1010. // * ServerException
  1011. // These errors are usually caused by a server-side issue.
  1012. //
  1013. // * InvalidParameterException
  1014. // The specified parameter is invalid. Review the available parameters for the
  1015. // API request.
  1016. //
  1017. // * RepositoryNotFoundException
  1018. // The specified repository could not be found. Check the spelling of the specified
  1019. // repository and ensure that you are performing operations on the correct registry.
  1020. //
  1021. func (c *ECR) ListImages(input *ListImagesInput) (*ListImagesOutput, error) {
  1022. req, out := c.ListImagesRequest(input)
  1023. err := req.Send()
  1024. return out, err
  1025. }
  1026. const opPutImage = "PutImage"
  1027. // PutImageRequest generates a "aws/request.Request" representing the
  1028. // client's request for the PutImage operation. The "output" return
  1029. // value can be used to capture response data after the request's "Send" method
  1030. // is called.
  1031. //
  1032. // See PutImage for usage and error information.
  1033. //
  1034. // Creating a request object using this method should be used when you want to inject
  1035. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1036. // access properties on the request object before or after sending the request. If
  1037. // you just want the service response, call the PutImage method directly
  1038. // instead.
  1039. //
  1040. // Note: You must call the "Send" method on the returned request object in order
  1041. // to execute the request.
  1042. //
  1043. // // Example sending a request using the PutImageRequest method.
  1044. // req, resp := client.PutImageRequest(params)
  1045. //
  1046. // err := req.Send()
  1047. // if err == nil { // resp is now filled
  1048. // fmt.Println(resp)
  1049. // }
  1050. //
  1051. func (c *ECR) PutImageRequest(input *PutImageInput) (req *request.Request, output *PutImageOutput) {
  1052. op := &request.Operation{
  1053. Name: opPutImage,
  1054. HTTPMethod: "POST",
  1055. HTTPPath: "/",
  1056. }
  1057. if input == nil {
  1058. input = &PutImageInput{}
  1059. }
  1060. req = c.newRequest(op, input, output)
  1061. output = &PutImageOutput{}
  1062. req.Data = output
  1063. return
  1064. }
  1065. // PutImage API operation for Amazon EC2 Container Registry.
  1066. //
  1067. // Creates or updates the image manifest associated with an image.
  1068. //
  1069. // This operation is used by the Amazon ECR proxy, and it is not intended for
  1070. // general use by customers. Use the docker CLI to pull, tag, and push images.
  1071. //
  1072. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1073. // with awserr.Error's Code and Message methods to get detailed information about
  1074. // the error.
  1075. //
  1076. // See the AWS API reference guide for Amazon EC2 Container Registry's
  1077. // API operation PutImage for usage and error information.
  1078. //
  1079. // Returned Error Codes:
  1080. // * ServerException
  1081. // These errors are usually caused by a server-side issue.
  1082. //
  1083. // * InvalidParameterException
  1084. // The specified parameter is invalid. Review the available parameters for the
  1085. // API request.
  1086. //
  1087. // * RepositoryNotFoundException
  1088. // The specified repository could not be found. Check the spelling of the specified
  1089. // repository and ensure that you are performing operations on the correct registry.
  1090. //
  1091. // * ImageAlreadyExistsException
  1092. // The specified image has already been pushed, and there are no changes to
  1093. // the manifest or image tag since the last push.
  1094. //
  1095. // * LayersNotFoundException
  1096. // The specified layers could not be found, or the specified layer is not valid
  1097. // for this repository.
  1098. //
  1099. // * LimitExceededException
  1100. // The operation did not succeed because it would have exceeded a service limit
  1101. // for your account. For more information, see Amazon ECR Default Service Limits
  1102. // (http://docs.aws.amazon.com/AmazonECR/latest/userguide/service_limits.html)
  1103. // in the Amazon EC2 Container Registry User Guide.
  1104. //
  1105. func (c *ECR) PutImage(input *PutImageInput) (*PutImageOutput, error) {
  1106. req, out := c.PutImageRequest(input)
  1107. err := req.Send()
  1108. return out, err
  1109. }
  1110. const opSetRepositoryPolicy = "SetRepositoryPolicy"
  1111. // SetRepositoryPolicyRequest generates a "aws/request.Request" representing the
  1112. // client's request for the SetRepositoryPolicy operation. The "output" return
  1113. // value can be used to capture response data after the request's "Send" method
  1114. // is called.
  1115. //
  1116. // See SetRepositoryPolicy for usage and error information.
  1117. //
  1118. // Creating a request object using this method should be used when you want to inject
  1119. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1120. // access properties on the request object before or after sending the request. If
  1121. // you just want the service response, call the SetRepositoryPolicy method directly
  1122. // instead.
  1123. //
  1124. // Note: You must call the "Send" method on the returned request object in order
  1125. // to execute the request.
  1126. //
  1127. // // Example sending a request using the SetRepositoryPolicyRequest method.
  1128. // req, resp := client.SetRepositoryPolicyRequest(params)
  1129. //
  1130. // err := req.Send()
  1131. // if err == nil { // resp is now filled
  1132. // fmt.Println(resp)
  1133. // }
  1134. //
  1135. func (c *ECR) SetRepositoryPolicyRequest(input *SetRepositoryPolicyInput) (req *request.Request, output *SetRepositoryPolicyOutput) {
  1136. op := &request.Operation{
  1137. Name: opSetRepositoryPolicy,
  1138. HTTPMethod: "POST",
  1139. HTTPPath: "/",
  1140. }
  1141. if input == nil {
  1142. input = &SetRepositoryPolicyInput{}
  1143. }
  1144. req = c.newRequest(op, input, output)
  1145. output = &SetRepositoryPolicyOutput{}
  1146. req.Data = output
  1147. return
  1148. }
  1149. // SetRepositoryPolicy API operation for Amazon EC2 Container Registry.
  1150. //
  1151. // Applies a repository policy on a specified repository to control access permissions.
  1152. //
  1153. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1154. // with awserr.Error's Code and Message methods to get detailed information about
  1155. // the error.
  1156. //
  1157. // See the AWS API reference guide for Amazon EC2 Container Registry's
  1158. // API operation SetRepositoryPolicy for usage and error information.
  1159. //
  1160. // Returned Error Codes:
  1161. // * ServerException
  1162. // These errors are usually caused by a server-side issue.
  1163. //
  1164. // * InvalidParameterException
  1165. // The specified parameter is invalid. Review the available parameters for the
  1166. // API request.
  1167. //
  1168. // * RepositoryNotFoundException
  1169. // The specified repository could not be found. Check the spelling of the specified
  1170. // repository and ensure that you are performing operations on the correct registry.
  1171. //
  1172. func (c *ECR) SetRepositoryPolicy(input *SetRepositoryPolicyInput) (*SetRepositoryPolicyOutput, error) {
  1173. req, out := c.SetRepositoryPolicyRequest(input)
  1174. err := req.Send()
  1175. return out, err
  1176. }
  1177. const opUploadLayerPart = "UploadLayerPart"
  1178. // UploadLayerPartRequest generates a "aws/request.Request" representing the
  1179. // client's request for the UploadLayerPart operation. The "output" return
  1180. // value can be used to capture response data after the request's "Send" method
  1181. // is called.
  1182. //
  1183. // See UploadLayerPart for usage and error information.
  1184. //
  1185. // Creating a request object using this method should be used when you want to inject
  1186. // custom logic into the request's lifecycle using a custom handler, or if you want to
  1187. // access properties on the request object before or after sending the request. If
  1188. // you just want the service response, call the UploadLayerPart method directly
  1189. // instead.
  1190. //
  1191. // Note: You must call the "Send" method on the returned request object in order
  1192. // to execute the request.
  1193. //
  1194. // // Example sending a request using the UploadLayerPartRequest method.
  1195. // req, resp := client.UploadLayerPartRequest(params)
  1196. //
  1197. // err := req.Send()
  1198. // if err == nil { // resp is now filled
  1199. // fmt.Println(resp)
  1200. // }
  1201. //
  1202. func (c *ECR) UploadLayerPartRequest(input *UploadLayerPartInput) (req *request.Request, output *UploadLayerPartOutput) {
  1203. op := &request.Operation{
  1204. Name: opUploadLayerPart,
  1205. HTTPMethod: "POST",
  1206. HTTPPath: "/",
  1207. }
  1208. if input == nil {
  1209. input = &UploadLayerPartInput{}
  1210. }
  1211. req = c.newRequest(op, input, output)
  1212. output = &UploadLayerPartOutput{}
  1213. req.Data = output
  1214. return
  1215. }
  1216. // UploadLayerPart API operation for Amazon EC2 Container Registry.
  1217. //
  1218. // Uploads an image layer part to Amazon ECR.
  1219. //
  1220. // This operation is used by the Amazon ECR proxy, and it is not intended for
  1221. // general use by customers. Use the docker CLI to pull, tag, and push images.
  1222. //
  1223. // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
  1224. // with awserr.Error's Code and Message methods to get detailed information about
  1225. // the error.
  1226. //
  1227. // See the AWS API reference guide for Amazon EC2 Container Registry's
  1228. // API operation UploadLayerPart for usage and error information.
  1229. //
  1230. // Returned Error Codes:
  1231. // * ServerException
  1232. // These errors are usually caused by a server-side issue.
  1233. //
  1234. // * InvalidParameterException
  1235. // The specified parameter is invalid. Review the available parameters for the
  1236. // API request.
  1237. //
  1238. // * InvalidLayerPartException
  1239. // The layer part size is not valid, or the first byte specified is not consecutive
  1240. // to the last byte of a previous layer part upload.
  1241. //
  1242. // * RepositoryNotFoundException
  1243. // The specified repository could not be found. Check the spelling of the specified
  1244. // repository and ensure that you are performing operations on the correct registry.
  1245. //
  1246. // * UploadNotFoundException
  1247. // The upload could not be found, or the specified upload id is not valid for
  1248. // this repository.
  1249. //
  1250. // * LimitExceededException
  1251. // The operation did not succeed because it would have exceeded a service limit
  1252. // for your account. For more information, see Amazon ECR Default Service Limits
  1253. // (http://docs.aws.amazon.com/AmazonECR/latest/userguide/service_limits.html)
  1254. // in the Amazon EC2 Container Registry User Guide.
  1255. //
  1256. func (c *ECR) UploadLayerPart(input *UploadLayerPartInput) (*UploadLayerPartOutput, error) {
  1257. req, out := c.UploadLayerPartRequest(input)
  1258. err := req.Send()
  1259. return out, err
  1260. }
  1261. // An object representing authorization data for an Amazon ECR registry.
  1262. type AuthorizationData struct {
  1263. _ struct{} `type:"structure"`
  1264. // A base64-encoded string that contains authorization data for the specified
  1265. // Amazon ECR registry. When the string is decoded, it is presented in the format
  1266. // user:password for private registry authentication using docker login.
  1267. AuthorizationToken *string `locationName:"authorizationToken" type:"string"`
  1268. // The Unix time in seconds and milliseconds when the authorization token expires.
  1269. // Authorization tokens are valid for 12 hours.
  1270. ExpiresAt *time.Time `locationName:"expiresAt" type:"timestamp" timestampFormat:"unix"`
  1271. // The registry URL to use for this authorization token in a docker login command.
  1272. // The Amazon ECR registry URL format is https://aws_account_id.dkr.ecr.region.amazonaws.com.
  1273. // For example, https://012345678910.dkr.ecr.us-east-1.amazonaws.com..
  1274. ProxyEndpoint *string `locationName:"proxyEndpoint" type:"string"`
  1275. }
  1276. // String returns the string representation
  1277. func (s AuthorizationData) String() string {
  1278. return awsutil.Prettify(s)
  1279. }
  1280. // GoString returns the string representation
  1281. func (s AuthorizationData) GoString() string {
  1282. return s.String()
  1283. }
  1284. type BatchCheckLayerAvailabilityInput struct {
  1285. _ struct{} `type:"structure"`
  1286. // The digests of the image layers to check.
  1287. //
  1288. // LayerDigests is a required field
  1289. LayerDigests []*string `locationName:"layerDigests" min:"1" type:"list" required:"true"`
  1290. // The AWS account ID associated with the registry that contains the image layers
  1291. // to check. If you do not specify a registry, the default registry is assumed.
  1292. RegistryId *string `locationName:"registryId" type:"string"`
  1293. // The name of the repository that is associated with the image layers to check.
  1294. //
  1295. // RepositoryName is a required field
  1296. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  1297. }
  1298. // String returns the string representation
  1299. func (s BatchCheckLayerAvailabilityInput) String() string {
  1300. return awsutil.Prettify(s)
  1301. }
  1302. // GoString returns the string representation
  1303. func (s BatchCheckLayerAvailabilityInput) GoString() string {
  1304. return s.String()
  1305. }
  1306. // Validate inspects the fields of the type to determine if they are valid.
  1307. func (s *BatchCheckLayerAvailabilityInput) Validate() error {
  1308. invalidParams := request.ErrInvalidParams{Context: "BatchCheckLayerAvailabilityInput"}
  1309. if s.LayerDigests == nil {
  1310. invalidParams.Add(request.NewErrParamRequired("LayerDigests"))
  1311. }
  1312. if s.LayerDigests != nil && len(s.LayerDigests) < 1 {
  1313. invalidParams.Add(request.NewErrParamMinLen("LayerDigests", 1))
  1314. }
  1315. if s.RepositoryName == nil {
  1316. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  1317. }
  1318. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  1319. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  1320. }
  1321. if invalidParams.Len() > 0 {
  1322. return invalidParams
  1323. }
  1324. return nil
  1325. }
  1326. type BatchCheckLayerAvailabilityOutput struct {
  1327. _ struct{} `type:"structure"`
  1328. // Any failures associated with the call.
  1329. Failures []*LayerFailure `locationName:"failures" type:"list"`
  1330. // A list of image layer objects corresponding to the image layer references
  1331. // in the request.
  1332. Layers []*Layer `locationName:"layers" type:"list"`
  1333. }
  1334. // String returns the string representation
  1335. func (s BatchCheckLayerAvailabilityOutput) String() string {
  1336. return awsutil.Prettify(s)
  1337. }
  1338. // GoString returns the string representation
  1339. func (s BatchCheckLayerAvailabilityOutput) GoString() string {
  1340. return s.String()
  1341. }
  1342. // Deletes specified images within a specified repository. Images are specified
  1343. // with either the imageTag or imageDigest.
  1344. type BatchDeleteImageInput struct {
  1345. _ struct{} `type:"structure"`
  1346. // A list of image ID references that correspond to images to delete. The format
  1347. // of the imageIds reference is imageTag=tag or imageDigest=digest.
  1348. //
  1349. // ImageIds is a required field
  1350. ImageIds []*ImageIdentifier `locationName:"imageIds" min:"1" type:"list" required:"true"`
  1351. // The AWS account ID associated with the registry that contains the image to
  1352. // delete. If you do not specify a registry, the default registry is assumed.
  1353. RegistryId *string `locationName:"registryId" type:"string"`
  1354. // The repository that contains the image to delete.
  1355. //
  1356. // RepositoryName is a required field
  1357. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  1358. }
  1359. // String returns the string representation
  1360. func (s BatchDeleteImageInput) String() string {
  1361. return awsutil.Prettify(s)
  1362. }
  1363. // GoString returns the string representation
  1364. func (s BatchDeleteImageInput) GoString() string {
  1365. return s.String()
  1366. }
  1367. // Validate inspects the fields of the type to determine if they are valid.
  1368. func (s *BatchDeleteImageInput) Validate() error {
  1369. invalidParams := request.ErrInvalidParams{Context: "BatchDeleteImageInput"}
  1370. if s.ImageIds == nil {
  1371. invalidParams.Add(request.NewErrParamRequired("ImageIds"))
  1372. }
  1373. if s.ImageIds != nil && len(s.ImageIds) < 1 {
  1374. invalidParams.Add(request.NewErrParamMinLen("ImageIds", 1))
  1375. }
  1376. if s.RepositoryName == nil {
  1377. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  1378. }
  1379. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  1380. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  1381. }
  1382. if invalidParams.Len() > 0 {
  1383. return invalidParams
  1384. }
  1385. return nil
  1386. }
  1387. type BatchDeleteImageOutput struct {
  1388. _ struct{} `type:"structure"`
  1389. // Any failures associated with the call.
  1390. Failures []*ImageFailure `locationName:"failures" type:"list"`
  1391. // The image IDs of the deleted images.
  1392. ImageIds []*ImageIdentifier `locationName:"imageIds" min:"1" type:"list"`
  1393. }
  1394. // String returns the string representation
  1395. func (s BatchDeleteImageOutput) String() string {
  1396. return awsutil.Prettify(s)
  1397. }
  1398. // GoString returns the string representation
  1399. func (s BatchDeleteImageOutput) GoString() string {
  1400. return s.String()
  1401. }
  1402. type BatchGetImageInput struct {
  1403. _ struct{} `type:"structure"`
  1404. // A list of image ID references that correspond to images to describe. The
  1405. // format of the imageIds reference is imageTag=tag or imageDigest=digest.
  1406. //
  1407. // ImageIds is a required field
  1408. ImageIds []*ImageIdentifier `locationName:"imageIds" min:"1" type:"list" required:"true"`
  1409. // The AWS account ID associated with the registry that contains the images
  1410. // to describe. If you do not specify a registry, the default registry is assumed.
  1411. RegistryId *string `locationName:"registryId" type:"string"`
  1412. // The repository that contains the images to describe.
  1413. //
  1414. // RepositoryName is a required field
  1415. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  1416. }
  1417. // String returns the string representation
  1418. func (s BatchGetImageInput) String() string {
  1419. return awsutil.Prettify(s)
  1420. }
  1421. // GoString returns the string representation
  1422. func (s BatchGetImageInput) GoString() string {
  1423. return s.String()
  1424. }
  1425. // Validate inspects the fields of the type to determine if they are valid.
  1426. func (s *BatchGetImageInput) Validate() error {
  1427. invalidParams := request.ErrInvalidParams{Context: "BatchGetImageInput"}
  1428. if s.ImageIds == nil {
  1429. invalidParams.Add(request.NewErrParamRequired("ImageIds"))
  1430. }
  1431. if s.ImageIds != nil && len(s.ImageIds) < 1 {
  1432. invalidParams.Add(request.NewErrParamMinLen("ImageIds", 1))
  1433. }
  1434. if s.RepositoryName == nil {
  1435. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  1436. }
  1437. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  1438. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  1439. }
  1440. if invalidParams.Len() > 0 {
  1441. return invalidParams
  1442. }
  1443. return nil
  1444. }
  1445. type BatchGetImageOutput struct {
  1446. _ struct{} `type:"structure"`
  1447. // Any failures associated with the call.
  1448. Failures []*ImageFailure `locationName:"failures" type:"list"`
  1449. // A list of image objects corresponding to the image references in the request.
  1450. Images []*Image `locationName:"images" type:"list"`
  1451. }
  1452. // String returns the string representation
  1453. func (s BatchGetImageOutput) String() string {
  1454. return awsutil.Prettify(s)
  1455. }
  1456. // GoString returns the string representation
  1457. func (s BatchGetImageOutput) GoString() string {
  1458. return s.String()
  1459. }
  1460. type CompleteLayerUploadInput struct {
  1461. _ struct{} `type:"structure"`
  1462. // The sha256 digest of the image layer.
  1463. //
  1464. // LayerDigests is a required field
  1465. LayerDigests []*string `locationName:"layerDigests" min:"1" type:"list" required:"true"`
  1466. // The AWS account ID associated with the registry to which to upload layers.
  1467. // If you do not specify a registry, the default registry is assumed.
  1468. RegistryId *string `locationName:"registryId" type:"string"`
  1469. // The name of the repository to associate with the image layer.
  1470. //
  1471. // RepositoryName is a required field
  1472. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  1473. // The upload ID from a previous InitiateLayerUpload operation to associate
  1474. // with the image layer.
  1475. //
  1476. // UploadId is a required field
  1477. UploadId *string `locationName:"uploadId" type:"string" required:"true"`
  1478. }
  1479. // String returns the string representation
  1480. func (s CompleteLayerUploadInput) String() string {
  1481. return awsutil.Prettify(s)
  1482. }
  1483. // GoString returns the string representation
  1484. func (s CompleteLayerUploadInput) GoString() string {
  1485. return s.String()
  1486. }
  1487. // Validate inspects the fields of the type to determine if they are valid.
  1488. func (s *CompleteLayerUploadInput) Validate() error {
  1489. invalidParams := request.ErrInvalidParams{Context: "CompleteLayerUploadInput"}
  1490. if s.LayerDigests == nil {
  1491. invalidParams.Add(request.NewErrParamRequired("LayerDigests"))
  1492. }
  1493. if s.LayerDigests != nil && len(s.LayerDigests) < 1 {
  1494. invalidParams.Add(request.NewErrParamMinLen("LayerDigests", 1))
  1495. }
  1496. if s.RepositoryName == nil {
  1497. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  1498. }
  1499. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  1500. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  1501. }
  1502. if s.UploadId == nil {
  1503. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  1504. }
  1505. if invalidParams.Len() > 0 {
  1506. return invalidParams
  1507. }
  1508. return nil
  1509. }
  1510. type CompleteLayerUploadOutput struct {
  1511. _ struct{} `type:"structure"`
  1512. // The sha256 digest of the image layer.
  1513. LayerDigest *string `locationName:"layerDigest" type:"string"`
  1514. // The registry ID associated with the request.
  1515. RegistryId *string `locationName:"registryId" type:"string"`
  1516. // The repository name associated with the request.
  1517. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"`
  1518. // The upload ID associated with the layer.
  1519. UploadId *string `locationName:"uploadId" type:"string"`
  1520. }
  1521. // String returns the string representation
  1522. func (s CompleteLayerUploadOutput) String() string {
  1523. return awsutil.Prettify(s)
  1524. }
  1525. // GoString returns the string representation
  1526. func (s CompleteLayerUploadOutput) GoString() string {
  1527. return s.String()
  1528. }
  1529. type CreateRepositoryInput struct {
  1530. _ struct{} `type:"structure"`
  1531. // The name to use for the repository. The repository name may be specified
  1532. // on its own (such as nginx-web-app) or it can be prepended with a namespace
  1533. // to group the repository into a category (such as project-a/nginx-web-app).
  1534. //
  1535. // RepositoryName is a required field
  1536. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  1537. }
  1538. // String returns the string representation
  1539. func (s CreateRepositoryInput) String() string {
  1540. return awsutil.Prettify(s)
  1541. }
  1542. // GoString returns the string representation
  1543. func (s CreateRepositoryInput) GoString() string {
  1544. return s.String()
  1545. }
  1546. // Validate inspects the fields of the type to determine if they are valid.
  1547. func (s *CreateRepositoryInput) Validate() error {
  1548. invalidParams := request.ErrInvalidParams{Context: "CreateRepositoryInput"}
  1549. if s.RepositoryName == nil {
  1550. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  1551. }
  1552. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  1553. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  1554. }
  1555. if invalidParams.Len() > 0 {
  1556. return invalidParams
  1557. }
  1558. return nil
  1559. }
  1560. type CreateRepositoryOutput struct {
  1561. _ struct{} `type:"structure"`
  1562. // The repository that was created.
  1563. Repository *Repository `locationName:"repository" type:"structure"`
  1564. }
  1565. // String returns the string representation
  1566. func (s CreateRepositoryOutput) String() string {
  1567. return awsutil.Prettify(s)
  1568. }
  1569. // GoString returns the string representation
  1570. func (s CreateRepositoryOutput) GoString() string {
  1571. return s.String()
  1572. }
  1573. type DeleteRepositoryInput struct {
  1574. _ struct{} `type:"structure"`
  1575. // Force the deletion of the repository if it contains images.
  1576. Force *bool `locationName:"force" type:"boolean"`
  1577. // The AWS account ID associated with the registry that contains the repository
  1578. // to delete. If you do not specify a registry, the default registry is assumed.
  1579. RegistryId *string `locationName:"registryId" type:"string"`
  1580. // The name of the repository to delete.
  1581. //
  1582. // RepositoryName is a required field
  1583. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  1584. }
  1585. // String returns the string representation
  1586. func (s DeleteRepositoryInput) String() string {
  1587. return awsutil.Prettify(s)
  1588. }
  1589. // GoString returns the string representation
  1590. func (s DeleteRepositoryInput) GoString() string {
  1591. return s.String()
  1592. }
  1593. // Validate inspects the fields of the type to determine if they are valid.
  1594. func (s *DeleteRepositoryInput) Validate() error {
  1595. invalidParams := request.ErrInvalidParams{Context: "DeleteRepositoryInput"}
  1596. if s.RepositoryName == nil {
  1597. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  1598. }
  1599. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  1600. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  1601. }
  1602. if invalidParams.Len() > 0 {
  1603. return invalidParams
  1604. }
  1605. return nil
  1606. }
  1607. type DeleteRepositoryOutput struct {
  1608. _ struct{} `type:"structure"`
  1609. // The repository that was deleted.
  1610. Repository *Repository `locationName:"repository" type:"structure"`
  1611. }
  1612. // String returns the string representation
  1613. func (s DeleteRepositoryOutput) String() string {
  1614. return awsutil.Prettify(s)
  1615. }
  1616. // GoString returns the string representation
  1617. func (s DeleteRepositoryOutput) GoString() string {
  1618. return s.String()
  1619. }
  1620. type DeleteRepositoryPolicyInput struct {
  1621. _ struct{} `type:"structure"`
  1622. // The AWS account ID associated with the registry that contains the repository
  1623. // policy to delete. If you do not specify a registry, the default registry
  1624. // is assumed.
  1625. RegistryId *string `locationName:"registryId" type:"string"`
  1626. // The name of the repository that is associated with the repository policy
  1627. // to delete.
  1628. //
  1629. // RepositoryName is a required field
  1630. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  1631. }
  1632. // String returns the string representation
  1633. func (s DeleteRepositoryPolicyInput) String() string {
  1634. return awsutil.Prettify(s)
  1635. }
  1636. // GoString returns the string representation
  1637. func (s DeleteRepositoryPolicyInput) GoString() string {
  1638. return s.String()
  1639. }
  1640. // Validate inspects the fields of the type to determine if they are valid.
  1641. func (s *DeleteRepositoryPolicyInput) Validate() error {
  1642. invalidParams := request.ErrInvalidParams{Context: "DeleteRepositoryPolicyInput"}
  1643. if s.RepositoryName == nil {
  1644. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  1645. }
  1646. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  1647. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  1648. }
  1649. if invalidParams.Len() > 0 {
  1650. return invalidParams
  1651. }
  1652. return nil
  1653. }
  1654. type DeleteRepositoryPolicyOutput struct {
  1655. _ struct{} `type:"structure"`
  1656. // The JSON repository policy that was deleted from the repository.
  1657. PolicyText *string `locationName:"policyText" type:"string"`
  1658. // The registry ID associated with the request.
  1659. RegistryId *string `locationName:"registryId" type:"string"`
  1660. // The repository name associated with the request.
  1661. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"`
  1662. }
  1663. // String returns the string representation
  1664. func (s DeleteRepositoryPolicyOutput) String() string {
  1665. return awsutil.Prettify(s)
  1666. }
  1667. // GoString returns the string representation
  1668. func (s DeleteRepositoryPolicyOutput) GoString() string {
  1669. return s.String()
  1670. }
  1671. // An object representing a filter on a DescribeImages operation.
  1672. type DescribeImagesFilter struct {
  1673. _ struct{} `type:"structure"`
  1674. // The tag status with which to filter your DescribeImages results. You can
  1675. // filter results based on whether they are TAGGED or UNTAGGED.
  1676. TagStatus *string `locationName:"tagStatus" type:"string" enum:"TagStatus"`
  1677. }
  1678. // String returns the string representation
  1679. func (s DescribeImagesFilter) String() string {
  1680. return awsutil.Prettify(s)
  1681. }
  1682. // GoString returns the string representation
  1683. func (s DescribeImagesFilter) GoString() string {
  1684. return s.String()
  1685. }
  1686. type DescribeImagesInput struct {
  1687. _ struct{} `type:"structure"`
  1688. // The filter key and value with which to filter your DescribeImages results.
  1689. Filter *DescribeImagesFilter `locationName:"filter" type:"structure"`
  1690. // The list of image IDs for the requested repository.
  1691. ImageIds []*ImageIdentifier `locationName:"imageIds" min:"1" type:"list"`
  1692. // The maximum number of repository results returned by DescribeImages in paginated
  1693. // output. When this parameter is used, DescribeImages only returns maxResults
  1694. // results in a single page along with a nextToken response element. The remaining
  1695. // results of the initial request can be seen by sending another DescribeImages
  1696. // request with the returned nextToken value. This value can be between 1 and
  1697. // 100. If this parameter is not used, then DescribeImages returns up to 100
  1698. // results and a nextToken value, if applicable.
  1699. MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"`
  1700. // The nextToken value returned from a previous paginated DescribeImages request
  1701. // where maxResults was used and the results exceeded the value of that parameter.
  1702. // Pagination continues from the end of the previous results that returned the
  1703. // nextToken value. This value is null when there are no more results to return.
  1704. NextToken *string `locationName:"nextToken" type:"string"`
  1705. // The AWS account ID associated with the registry that contains the repository
  1706. // in which to list images. If you do not specify a registry, the default registry
  1707. // is assumed.
  1708. RegistryId *string `locationName:"registryId" type:"string"`
  1709. // A list of repositories to describe. If this parameter is omitted, then all
  1710. // repositories in a registry are described.
  1711. //
  1712. // RepositoryName is a required field
  1713. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  1714. }
  1715. // String returns the string representation
  1716. func (s DescribeImagesInput) String() string {
  1717. return awsutil.Prettify(s)
  1718. }
  1719. // GoString returns the string representation
  1720. func (s DescribeImagesInput) GoString() string {
  1721. return s.String()
  1722. }
  1723. // Validate inspects the fields of the type to determine if they are valid.
  1724. func (s *DescribeImagesInput) Validate() error {
  1725. invalidParams := request.ErrInvalidParams{Context: "DescribeImagesInput"}
  1726. if s.ImageIds != nil && len(s.ImageIds) < 1 {
  1727. invalidParams.Add(request.NewErrParamMinLen("ImageIds", 1))
  1728. }
  1729. if s.MaxResults != nil && *s.MaxResults < 1 {
  1730. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  1731. }
  1732. if s.RepositoryName == nil {
  1733. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  1734. }
  1735. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  1736. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  1737. }
  1738. if invalidParams.Len() > 0 {
  1739. return invalidParams
  1740. }
  1741. return nil
  1742. }
  1743. type DescribeImagesOutput struct {
  1744. _ struct{} `type:"structure"`
  1745. // A list of ImageDetail objects that contain data about the image.
  1746. ImageDetails []*ImageDetail `locationName:"imageDetails" type:"list"`
  1747. // The nextToken value to include in a future DescribeImages request. When the
  1748. // results of a DescribeImages request exceed maxResults, this value can be
  1749. // used to retrieve the next page of results. This value is null when there
  1750. // are no more results to return.
  1751. NextToken *string `locationName:"nextToken" type:"string"`
  1752. }
  1753. // String returns the string representation
  1754. func (s DescribeImagesOutput) String() string {
  1755. return awsutil.Prettify(s)
  1756. }
  1757. // GoString returns the string representation
  1758. func (s DescribeImagesOutput) GoString() string {
  1759. return s.String()
  1760. }
  1761. type DescribeRepositoriesInput struct {
  1762. _ struct{} `type:"structure"`
  1763. // The maximum number of repository results returned by DescribeRepositories
  1764. // in paginated output. When this parameter is used, DescribeRepositories only
  1765. // returns maxResults results in a single page along with a nextToken response
  1766. // element. The remaining results of the initial request can be seen by sending
  1767. // another DescribeRepositories request with the returned nextToken value. This
  1768. // value can be between 1 and 100. If this parameter is not used, then DescribeRepositories
  1769. // returns up to 100 results and a nextToken value, if applicable.
  1770. MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"`
  1771. // The nextToken value returned from a previous paginated DescribeRepositories
  1772. // request where maxResults was used and the results exceeded the value of that
  1773. // parameter. Pagination continues from the end of the previous results that
  1774. // returned the nextToken value. This value is null when there are no more results
  1775. // to return.
  1776. //
  1777. // This token should be treated as an opaque identifier that is only used to
  1778. // retrieve the next items in a list and not for other programmatic purposes.
  1779. NextToken *string `locationName:"nextToken" type:"string"`
  1780. // The AWS account ID associated with the registry that contains the repositories
  1781. // to be described. If you do not specify a registry, the default registry is
  1782. // assumed.
  1783. RegistryId *string `locationName:"registryId" type:"string"`
  1784. // A list of repositories to describe. If this parameter is omitted, then all
  1785. // repositories in a registry are described.
  1786. RepositoryNames []*string `locationName:"repositoryNames" min:"1" type:"list"`
  1787. }
  1788. // String returns the string representation
  1789. func (s DescribeRepositoriesInput) String() string {
  1790. return awsutil.Prettify(s)
  1791. }
  1792. // GoString returns the string representation
  1793. func (s DescribeRepositoriesInput) GoString() string {
  1794. return s.String()
  1795. }
  1796. // Validate inspects the fields of the type to determine if they are valid.
  1797. func (s *DescribeRepositoriesInput) Validate() error {
  1798. invalidParams := request.ErrInvalidParams{Context: "DescribeRepositoriesInput"}
  1799. if s.MaxResults != nil && *s.MaxResults < 1 {
  1800. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  1801. }
  1802. if s.RepositoryNames != nil && len(s.RepositoryNames) < 1 {
  1803. invalidParams.Add(request.NewErrParamMinLen("RepositoryNames", 1))
  1804. }
  1805. if invalidParams.Len() > 0 {
  1806. return invalidParams
  1807. }
  1808. return nil
  1809. }
  1810. type DescribeRepositoriesOutput struct {
  1811. _ struct{} `type:"structure"`
  1812. // The nextToken value to include in a future DescribeRepositories request.
  1813. // When the results of a DescribeRepositories request exceed maxResults, this
  1814. // value can be used to retrieve the next page of results. This value is null
  1815. // when there are no more results to return.
  1816. NextToken *string `locationName:"nextToken" type:"string"`
  1817. // A list of repository objects corresponding to valid repositories.
  1818. Repositories []*Repository `locationName:"repositories" type:"list"`
  1819. }
  1820. // String returns the string representation
  1821. func (s DescribeRepositoriesOutput) String() string {
  1822. return awsutil.Prettify(s)
  1823. }
  1824. // GoString returns the string representation
  1825. func (s DescribeRepositoriesOutput) GoString() string {
  1826. return s.String()
  1827. }
  1828. type GetAuthorizationTokenInput struct {
  1829. _ struct{} `type:"structure"`
  1830. // A list of AWS account IDs that are associated with the registries for which
  1831. // to get authorization tokens. If you do not specify a registry, the default
  1832. // registry is assumed.
  1833. RegistryIds []*string `locationName:"registryIds" min:"1" type:"list"`
  1834. }
  1835. // String returns the string representation
  1836. func (s GetAuthorizationTokenInput) String() string {
  1837. return awsutil.Prettify(s)
  1838. }
  1839. // GoString returns the string representation
  1840. func (s GetAuthorizationTokenInput) GoString() string {
  1841. return s.String()
  1842. }
  1843. // Validate inspects the fields of the type to determine if they are valid.
  1844. func (s *GetAuthorizationTokenInput) Validate() error {
  1845. invalidParams := request.ErrInvalidParams{Context: "GetAuthorizationTokenInput"}
  1846. if s.RegistryIds != nil && len(s.RegistryIds) < 1 {
  1847. invalidParams.Add(request.NewErrParamMinLen("RegistryIds", 1))
  1848. }
  1849. if invalidParams.Len() > 0 {
  1850. return invalidParams
  1851. }
  1852. return nil
  1853. }
  1854. type GetAuthorizationTokenOutput struct {
  1855. _ struct{} `type:"structure"`
  1856. // A list of authorization token data objects that correspond to the registryIds
  1857. // values in the request.
  1858. AuthorizationData []*AuthorizationData `locationName:"authorizationData" type:"list"`
  1859. }
  1860. // String returns the string representation
  1861. func (s GetAuthorizationTokenOutput) String() string {
  1862. return awsutil.Prettify(s)
  1863. }
  1864. // GoString returns the string representation
  1865. func (s GetAuthorizationTokenOutput) GoString() string {
  1866. return s.String()
  1867. }
  1868. type GetDownloadUrlForLayerInput struct {
  1869. _ struct{} `type:"structure"`
  1870. // The digest of the image layer to download.
  1871. //
  1872. // LayerDigest is a required field
  1873. LayerDigest *string `locationName:"layerDigest" type:"string" required:"true"`
  1874. // The AWS account ID associated with the registry that contains the image layer
  1875. // to download. If you do not specify a registry, the default registry is assumed.
  1876. RegistryId *string `locationName:"registryId" type:"string"`
  1877. // The name of the repository that is associated with the image layer to download.
  1878. //
  1879. // RepositoryName is a required field
  1880. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  1881. }
  1882. // String returns the string representation
  1883. func (s GetDownloadUrlForLayerInput) String() string {
  1884. return awsutil.Prettify(s)
  1885. }
  1886. // GoString returns the string representation
  1887. func (s GetDownloadUrlForLayerInput) GoString() string {
  1888. return s.String()
  1889. }
  1890. // Validate inspects the fields of the type to determine if they are valid.
  1891. func (s *GetDownloadUrlForLayerInput) Validate() error {
  1892. invalidParams := request.ErrInvalidParams{Context: "GetDownloadUrlForLayerInput"}
  1893. if s.LayerDigest == nil {
  1894. invalidParams.Add(request.NewErrParamRequired("LayerDigest"))
  1895. }
  1896. if s.RepositoryName == nil {
  1897. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  1898. }
  1899. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  1900. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  1901. }
  1902. if invalidParams.Len() > 0 {
  1903. return invalidParams
  1904. }
  1905. return nil
  1906. }
  1907. type GetDownloadUrlForLayerOutput struct {
  1908. _ struct{} `type:"structure"`
  1909. // The pre-signed Amazon S3 download URL for the requested layer.
  1910. DownloadUrl *string `locationName:"downloadUrl" type:"string"`
  1911. // The digest of the image layer to download.
  1912. LayerDigest *string `locationName:"layerDigest" type:"string"`
  1913. }
  1914. // String returns the string representation
  1915. func (s GetDownloadUrlForLayerOutput) String() string {
  1916. return awsutil.Prettify(s)
  1917. }
  1918. // GoString returns the string representation
  1919. func (s GetDownloadUrlForLayerOutput) GoString() string {
  1920. return s.String()
  1921. }
  1922. type GetRepositoryPolicyInput struct {
  1923. _ struct{} `type:"structure"`
  1924. // The AWS account ID associated with the registry that contains the repository.
  1925. // If you do not specify a registry, the default registry is assumed.
  1926. RegistryId *string `locationName:"registryId" type:"string"`
  1927. // The name of the repository whose policy you want to retrieve.
  1928. //
  1929. // RepositoryName is a required field
  1930. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  1931. }
  1932. // String returns the string representation
  1933. func (s GetRepositoryPolicyInput) String() string {
  1934. return awsutil.Prettify(s)
  1935. }
  1936. // GoString returns the string representation
  1937. func (s GetRepositoryPolicyInput) GoString() string {
  1938. return s.String()
  1939. }
  1940. // Validate inspects the fields of the type to determine if they are valid.
  1941. func (s *GetRepositoryPolicyInput) Validate() error {
  1942. invalidParams := request.ErrInvalidParams{Context: "GetRepositoryPolicyInput"}
  1943. if s.RepositoryName == nil {
  1944. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  1945. }
  1946. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  1947. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  1948. }
  1949. if invalidParams.Len() > 0 {
  1950. return invalidParams
  1951. }
  1952. return nil
  1953. }
  1954. type GetRepositoryPolicyOutput struct {
  1955. _ struct{} `type:"structure"`
  1956. // The JSON repository policy text associated with the repository.
  1957. PolicyText *string `locationName:"policyText" type:"string"`
  1958. // The registry ID associated with the request.
  1959. RegistryId *string `locationName:"registryId" type:"string"`
  1960. // The repository name associated with the request.
  1961. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"`
  1962. }
  1963. // String returns the string representation
  1964. func (s GetRepositoryPolicyOutput) String() string {
  1965. return awsutil.Prettify(s)
  1966. }
  1967. // GoString returns the string representation
  1968. func (s GetRepositoryPolicyOutput) GoString() string {
  1969. return s.String()
  1970. }
  1971. // An object representing an Amazon ECR image.
  1972. type Image struct {
  1973. _ struct{} `type:"structure"`
  1974. // An object containing the image tag and image digest associated with an image.
  1975. ImageId *ImageIdentifier `locationName:"imageId" type:"structure"`
  1976. // The image manifest associated with the image.
  1977. ImageManifest *string `locationName:"imageManifest" type:"string"`
  1978. // The AWS account ID associated with the registry containing the image.
  1979. RegistryId *string `locationName:"registryId" type:"string"`
  1980. // The name of the repository associated with the image.
  1981. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"`
  1982. }
  1983. // String returns the string representation
  1984. func (s Image) String() string {
  1985. return awsutil.Prettify(s)
  1986. }
  1987. // GoString returns the string representation
  1988. func (s Image) GoString() string {
  1989. return s.String()
  1990. }
  1991. // An object that describes an image returned by a DescribeImages operation.
  1992. type ImageDetail struct {
  1993. _ struct{} `type:"structure"`
  1994. // The sha256 digest of the image manifest.
  1995. ImageDigest *string `locationName:"imageDigest" type:"string"`
  1996. // The date and time, expressed in standard JavaScript date format, at which
  1997. // the current image was pushed to the repository.
  1998. ImagePushedAt *time.Time `locationName:"imagePushedAt" type:"timestamp" timestampFormat:"unix"`
  1999. // The size, in bytes, of the image in the repository.
  2000. //
  2001. // Beginning with Docker version 1.9, the Docker client compresses image layers
  2002. // before pushing them to a V2 Docker registry. The output of the docker images
  2003. // command shows the uncompressed image size, so it may return a larger image
  2004. // size than the image sizes returned by DescribeImages.
  2005. ImageSizeInBytes *int64 `locationName:"imageSizeInBytes" type:"long"`
  2006. // The list of tags associated with this image.
  2007. ImageTags []*string `locationName:"imageTags" type:"list"`
  2008. // The AWS account ID associated with the registry to which this image belongs.
  2009. RegistryId *string `locationName:"registryId" type:"string"`
  2010. // The name of the repository to which this image belongs.
  2011. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"`
  2012. }
  2013. // String returns the string representation
  2014. func (s ImageDetail) String() string {
  2015. return awsutil.Prettify(s)
  2016. }
  2017. // GoString returns the string representation
  2018. func (s ImageDetail) GoString() string {
  2019. return s.String()
  2020. }
  2021. // An object representing an Amazon ECR image failure.
  2022. type ImageFailure struct {
  2023. _ struct{} `type:"structure"`
  2024. // The code associated with the failure.
  2025. FailureCode *string `locationName:"failureCode" type:"string" enum:"ImageFailureCode"`
  2026. // The reason for the failure.
  2027. FailureReason *string `locationName:"failureReason" type:"string"`
  2028. // The image ID associated with the failure.
  2029. ImageId *ImageIdentifier `locationName:"imageId" type:"structure"`
  2030. }
  2031. // String returns the string representation
  2032. func (s ImageFailure) String() string {
  2033. return awsutil.Prettify(s)
  2034. }
  2035. // GoString returns the string representation
  2036. func (s ImageFailure) GoString() string {
  2037. return s.String()
  2038. }
  2039. // An object with identifying information for an Amazon ECR image.
  2040. type ImageIdentifier struct {
  2041. _ struct{} `type:"structure"`
  2042. // The sha256 digest of the image manifest.
  2043. ImageDigest *string `locationName:"imageDigest" type:"string"`
  2044. // The tag used for the image.
  2045. ImageTag *string `locationName:"imageTag" type:"string"`
  2046. }
  2047. // String returns the string representation
  2048. func (s ImageIdentifier) String() string {
  2049. return awsutil.Prettify(s)
  2050. }
  2051. // GoString returns the string representation
  2052. func (s ImageIdentifier) GoString() string {
  2053. return s.String()
  2054. }
  2055. type InitiateLayerUploadInput struct {
  2056. _ struct{} `type:"structure"`
  2057. // The AWS account ID associated with the registry that you intend to upload
  2058. // layers to. If you do not specify a registry, the default registry is assumed.
  2059. RegistryId *string `locationName:"registryId" type:"string"`
  2060. // The name of the repository that you intend to upload layers to.
  2061. //
  2062. // RepositoryName is a required field
  2063. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  2064. }
  2065. // String returns the string representation
  2066. func (s InitiateLayerUploadInput) String() string {
  2067. return awsutil.Prettify(s)
  2068. }
  2069. // GoString returns the string representation
  2070. func (s InitiateLayerUploadInput) GoString() string {
  2071. return s.String()
  2072. }
  2073. // Validate inspects the fields of the type to determine if they are valid.
  2074. func (s *InitiateLayerUploadInput) Validate() error {
  2075. invalidParams := request.ErrInvalidParams{Context: "InitiateLayerUploadInput"}
  2076. if s.RepositoryName == nil {
  2077. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  2078. }
  2079. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  2080. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  2081. }
  2082. if invalidParams.Len() > 0 {
  2083. return invalidParams
  2084. }
  2085. return nil
  2086. }
  2087. type InitiateLayerUploadOutput struct {
  2088. _ struct{} `type:"structure"`
  2089. // The size, in bytes, that Amazon ECR expects future layer part uploads to
  2090. // be.
  2091. PartSize *int64 `locationName:"partSize" type:"long"`
  2092. // The upload ID for the layer upload. This parameter is passed to further UploadLayerPart
  2093. // and CompleteLayerUpload operations.
  2094. UploadId *string `locationName:"uploadId" type:"string"`
  2095. }
  2096. // String returns the string representation
  2097. func (s InitiateLayerUploadOutput) String() string {
  2098. return awsutil.Prettify(s)
  2099. }
  2100. // GoString returns the string representation
  2101. func (s InitiateLayerUploadOutput) GoString() string {
  2102. return s.String()
  2103. }
  2104. // An object representing an Amazon ECR image layer.
  2105. type Layer struct {
  2106. _ struct{} `type:"structure"`
  2107. // The availability status of the image layer. Valid values are AVAILABLE and
  2108. // UNAVAILABLE.
  2109. LayerAvailability *string `locationName:"layerAvailability" type:"string" enum:"LayerAvailability"`
  2110. // The sha256 digest of the image layer.
  2111. LayerDigest *string `locationName:"layerDigest" type:"string"`
  2112. // The size, in bytes, of the image layer.
  2113. LayerSize *int64 `locationName:"layerSize" type:"long"`
  2114. }
  2115. // String returns the string representation
  2116. func (s Layer) String() string {
  2117. return awsutil.Prettify(s)
  2118. }
  2119. // GoString returns the string representation
  2120. func (s Layer) GoString() string {
  2121. return s.String()
  2122. }
  2123. // An object representing an Amazon ECR image layer failure.
  2124. type LayerFailure struct {
  2125. _ struct{} `type:"structure"`
  2126. // The failure code associated with the failure.
  2127. FailureCode *string `locationName:"failureCode" type:"string" enum:"LayerFailureCode"`
  2128. // The reason for the failure.
  2129. FailureReason *string `locationName:"failureReason" type:"string"`
  2130. // The layer digest associated with the failure.
  2131. LayerDigest *string `locationName:"layerDigest" type:"string"`
  2132. }
  2133. // String returns the string representation
  2134. func (s LayerFailure) String() string {
  2135. return awsutil.Prettify(s)
  2136. }
  2137. // GoString returns the string representation
  2138. func (s LayerFailure) GoString() string {
  2139. return s.String()
  2140. }
  2141. // An object representing a filter on a ListImages operation.
  2142. type ListImagesFilter struct {
  2143. _ struct{} `type:"structure"`
  2144. // The tag status with which to filter your ListImages results. You can filter
  2145. // results based on whether they are TAGGED or UNTAGGED.
  2146. TagStatus *string `locationName:"tagStatus" type:"string" enum:"TagStatus"`
  2147. }
  2148. // String returns the string representation
  2149. func (s ListImagesFilter) String() string {
  2150. return awsutil.Prettify(s)
  2151. }
  2152. // GoString returns the string representation
  2153. func (s ListImagesFilter) GoString() string {
  2154. return s.String()
  2155. }
  2156. type ListImagesInput struct {
  2157. _ struct{} `type:"structure"`
  2158. // The filter key and value with which to filter your ListImages results.
  2159. Filter *ListImagesFilter `locationName:"filter" type:"structure"`
  2160. // The maximum number of image results returned by ListImages in paginated output.
  2161. // When this parameter is used, ListImages only returns maxResults results in
  2162. // a single page along with a nextToken response element. The remaining results
  2163. // of the initial request can be seen by sending another ListImages request
  2164. // with the returned nextToken value. This value can be between 1 and 100. If
  2165. // this parameter is not used, then ListImages returns up to 100 results and
  2166. // a nextToken value, if applicable.
  2167. MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"`
  2168. // The nextToken value returned from a previous paginated ListImages request
  2169. // where maxResults was used and the results exceeded the value of that parameter.
  2170. // Pagination continues from the end of the previous results that returned the
  2171. // nextToken value. This value is null when there are no more results to return.
  2172. //
  2173. // This token should be treated as an opaque identifier that is only used to
  2174. // retrieve the next items in a list and not for other programmatic purposes.
  2175. NextToken *string `locationName:"nextToken" type:"string"`
  2176. // The AWS account ID associated with the registry that contains the repository
  2177. // to list images in. If you do not specify a registry, the default registry
  2178. // is assumed.
  2179. RegistryId *string `locationName:"registryId" type:"string"`
  2180. // The repository whose image IDs are to be listed.
  2181. //
  2182. // RepositoryName is a required field
  2183. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  2184. }
  2185. // String returns the string representation
  2186. func (s ListImagesInput) String() string {
  2187. return awsutil.Prettify(s)
  2188. }
  2189. // GoString returns the string representation
  2190. func (s ListImagesInput) GoString() string {
  2191. return s.String()
  2192. }
  2193. // Validate inspects the fields of the type to determine if they are valid.
  2194. func (s *ListImagesInput) Validate() error {
  2195. invalidParams := request.ErrInvalidParams{Context: "ListImagesInput"}
  2196. if s.MaxResults != nil && *s.MaxResults < 1 {
  2197. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  2198. }
  2199. if s.RepositoryName == nil {
  2200. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  2201. }
  2202. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  2203. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  2204. }
  2205. if invalidParams.Len() > 0 {
  2206. return invalidParams
  2207. }
  2208. return nil
  2209. }
  2210. type ListImagesOutput struct {
  2211. _ struct{} `type:"structure"`
  2212. // The list of image IDs for the requested repository.
  2213. ImageIds []*ImageIdentifier `locationName:"imageIds" min:"1" type:"list"`
  2214. // The nextToken value to include in a future ListImages request. When the results
  2215. // of a ListImages request exceed maxResults, this value can be used to retrieve
  2216. // the next page of results. This value is null when there are no more results
  2217. // to return.
  2218. NextToken *string `locationName:"nextToken" type:"string"`
  2219. }
  2220. // String returns the string representation
  2221. func (s ListImagesOutput) String() string {
  2222. return awsutil.Prettify(s)
  2223. }
  2224. // GoString returns the string representation
  2225. func (s ListImagesOutput) GoString() string {
  2226. return s.String()
  2227. }
  2228. type PutImageInput struct {
  2229. _ struct{} `type:"structure"`
  2230. // The image manifest corresponding to the image to be uploaded.
  2231. //
  2232. // ImageManifest is a required field
  2233. ImageManifest *string `locationName:"imageManifest" type:"string" required:"true"`
  2234. // The AWS account ID associated with the registry that contains the repository
  2235. // in which to put the image. If you do not specify a registry, the default
  2236. // registry is assumed.
  2237. RegistryId *string `locationName:"registryId" type:"string"`
  2238. // The name of the repository in which to put the image.
  2239. //
  2240. // RepositoryName is a required field
  2241. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  2242. }
  2243. // String returns the string representation
  2244. func (s PutImageInput) String() string {
  2245. return awsutil.Prettify(s)
  2246. }
  2247. // GoString returns the string representation
  2248. func (s PutImageInput) GoString() string {
  2249. return s.String()
  2250. }
  2251. // Validate inspects the fields of the type to determine if they are valid.
  2252. func (s *PutImageInput) Validate() error {
  2253. invalidParams := request.ErrInvalidParams{Context: "PutImageInput"}
  2254. if s.ImageManifest == nil {
  2255. invalidParams.Add(request.NewErrParamRequired("ImageManifest"))
  2256. }
  2257. if s.RepositoryName == nil {
  2258. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  2259. }
  2260. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  2261. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  2262. }
  2263. if invalidParams.Len() > 0 {
  2264. return invalidParams
  2265. }
  2266. return nil
  2267. }
  2268. type PutImageOutput struct {
  2269. _ struct{} `type:"structure"`
  2270. // Details of the image uploaded.
  2271. Image *Image `locationName:"image" type:"structure"`
  2272. }
  2273. // String returns the string representation
  2274. func (s PutImageOutput) String() string {
  2275. return awsutil.Prettify(s)
  2276. }
  2277. // GoString returns the string representation
  2278. func (s PutImageOutput) GoString() string {
  2279. return s.String()
  2280. }
  2281. // An object representing a repository.
  2282. type Repository struct {
  2283. _ struct{} `type:"structure"`
  2284. // The date and time, in JavaScript date/time format, when the repository was
  2285. // created.
  2286. CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix"`
  2287. // The AWS account ID associated with the registry that contains the repository.
  2288. RegistryId *string `locationName:"registryId" type:"string"`
  2289. // The Amazon Resource Name (ARN) that identifies the repository. The ARN contains
  2290. // the arn:aws:ecr namespace, followed by the region of the repository, the
  2291. // AWS account ID of the repository owner, the repository namespace, and then
  2292. // the repository name. For example, arn:aws:ecr:region:012345678910:repository/test.
  2293. RepositoryArn *string `locationName:"repositoryArn" type:"string"`
  2294. // The name of the repository.
  2295. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"`
  2296. // The URI for the repository. You can use this URI for Docker push and pull
  2297. // operations.
  2298. RepositoryUri *string `locationName:"repositoryUri" type:"string"`
  2299. }
  2300. // String returns the string representation
  2301. func (s Repository) String() string {
  2302. return awsutil.Prettify(s)
  2303. }
  2304. // GoString returns the string representation
  2305. func (s Repository) GoString() string {
  2306. return s.String()
  2307. }
  2308. type SetRepositoryPolicyInput struct {
  2309. _ struct{} `type:"structure"`
  2310. // If the policy you are attempting to set on a repository policy would prevent
  2311. // you from setting another policy in the future, you must force the SetRepositoryPolicy
  2312. // operation. This is intended to prevent accidental repository lock outs.
  2313. Force *bool `locationName:"force" type:"boolean"`
  2314. // The JSON repository policy text to apply to the repository.
  2315. //
  2316. // PolicyText is a required field
  2317. PolicyText *string `locationName:"policyText" type:"string" required:"true"`
  2318. // The AWS account ID associated with the registry that contains the repository.
  2319. // If you do not specify a registry, the default registry is assumed.
  2320. RegistryId *string `locationName:"registryId" type:"string"`
  2321. // The name of the repository to receive the policy.
  2322. //
  2323. // RepositoryName is a required field
  2324. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  2325. }
  2326. // String returns the string representation
  2327. func (s SetRepositoryPolicyInput) String() string {
  2328. return awsutil.Prettify(s)
  2329. }
  2330. // GoString returns the string representation
  2331. func (s SetRepositoryPolicyInput) GoString() string {
  2332. return s.String()
  2333. }
  2334. // Validate inspects the fields of the type to determine if they are valid.
  2335. func (s *SetRepositoryPolicyInput) Validate() error {
  2336. invalidParams := request.ErrInvalidParams{Context: "SetRepositoryPolicyInput"}
  2337. if s.PolicyText == nil {
  2338. invalidParams.Add(request.NewErrParamRequired("PolicyText"))
  2339. }
  2340. if s.RepositoryName == nil {
  2341. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  2342. }
  2343. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  2344. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  2345. }
  2346. if invalidParams.Len() > 0 {
  2347. return invalidParams
  2348. }
  2349. return nil
  2350. }
  2351. type SetRepositoryPolicyOutput struct {
  2352. _ struct{} `type:"structure"`
  2353. // The JSON repository policy text applied to the repository.
  2354. PolicyText *string `locationName:"policyText" type:"string"`
  2355. // The registry ID associated with the request.
  2356. RegistryId *string `locationName:"registryId" type:"string"`
  2357. // The repository name associated with the request.
  2358. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"`
  2359. }
  2360. // String returns the string representation
  2361. func (s SetRepositoryPolicyOutput) String() string {
  2362. return awsutil.Prettify(s)
  2363. }
  2364. // GoString returns the string representation
  2365. func (s SetRepositoryPolicyOutput) GoString() string {
  2366. return s.String()
  2367. }
  2368. type UploadLayerPartInput struct {
  2369. _ struct{} `type:"structure"`
  2370. // The base64-encoded layer part payload.
  2371. //
  2372. // LayerPartBlob is automatically base64 encoded/decoded by the SDK.
  2373. //
  2374. // LayerPartBlob is a required field
  2375. LayerPartBlob []byte `locationName:"layerPartBlob" type:"blob" required:"true"`
  2376. // The integer value of the first byte of the layer part.
  2377. //
  2378. // PartFirstByte is a required field
  2379. PartFirstByte *int64 `locationName:"partFirstByte" type:"long" required:"true"`
  2380. // The integer value of the last byte of the layer part.
  2381. //
  2382. // PartLastByte is a required field
  2383. PartLastByte *int64 `locationName:"partLastByte" type:"long" required:"true"`
  2384. // The AWS account ID associated with the registry that you are uploading layer
  2385. // parts to. If you do not specify a registry, the default registry is assumed.
  2386. RegistryId *string `locationName:"registryId" type:"string"`
  2387. // The name of the repository that you are uploading layer parts to.
  2388. //
  2389. // RepositoryName is a required field
  2390. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  2391. // The upload ID from a previous InitiateLayerUpload operation to associate
  2392. // with the layer part upload.
  2393. //
  2394. // UploadId is a required field
  2395. UploadId *string `locationName:"uploadId" type:"string" required:"true"`
  2396. }
  2397. // String returns the string representation
  2398. func (s UploadLayerPartInput) String() string {
  2399. return awsutil.Prettify(s)
  2400. }
  2401. // GoString returns the string representation
  2402. func (s UploadLayerPartInput) GoString() string {
  2403. return s.String()
  2404. }
  2405. // Validate inspects the fields of the type to determine if they are valid.
  2406. func (s *UploadLayerPartInput) Validate() error {
  2407. invalidParams := request.ErrInvalidParams{Context: "UploadLayerPartInput"}
  2408. if s.LayerPartBlob == nil {
  2409. invalidParams.Add(request.NewErrParamRequired("LayerPartBlob"))
  2410. }
  2411. if s.PartFirstByte == nil {
  2412. invalidParams.Add(request.NewErrParamRequired("PartFirstByte"))
  2413. }
  2414. if s.PartLastByte == nil {
  2415. invalidParams.Add(request.NewErrParamRequired("PartLastByte"))
  2416. }
  2417. if s.RepositoryName == nil {
  2418. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  2419. }
  2420. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  2421. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  2422. }
  2423. if s.UploadId == nil {
  2424. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  2425. }
  2426. if invalidParams.Len() > 0 {
  2427. return invalidParams
  2428. }
  2429. return nil
  2430. }
  2431. type UploadLayerPartOutput struct {
  2432. _ struct{} `type:"structure"`
  2433. // The integer value of the last byte received in the request.
  2434. LastByteReceived *int64 `locationName:"lastByteReceived" type:"long"`
  2435. // The registry ID associated with the request.
  2436. RegistryId *string `locationName:"registryId" type:"string"`
  2437. // The repository name associated with the request.
  2438. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"`
  2439. // The upload ID associated with the request.
  2440. UploadId *string `locationName:"uploadId" type:"string"`
  2441. }
  2442. // String returns the string representation
  2443. func (s UploadLayerPartOutput) String() string {
  2444. return awsutil.Prettify(s)
  2445. }
  2446. // GoString returns the string representation
  2447. func (s UploadLayerPartOutput) GoString() string {
  2448. return s.String()
  2449. }
  2450. const (
  2451. // ImageFailureCodeInvalidImageDigest is a ImageFailureCode enum value
  2452. ImageFailureCodeInvalidImageDigest = "InvalidImageDigest"
  2453. // ImageFailureCodeInvalidImageTag is a ImageFailureCode enum value
  2454. ImageFailureCodeInvalidImageTag = "InvalidImageTag"
  2455. // ImageFailureCodeImageTagDoesNotMatchDigest is a ImageFailureCode enum value
  2456. ImageFailureCodeImageTagDoesNotMatchDigest = "ImageTagDoesNotMatchDigest"
  2457. // ImageFailureCodeImageNotFound is a ImageFailureCode enum value
  2458. ImageFailureCodeImageNotFound = "ImageNotFound"
  2459. // ImageFailureCodeMissingDigestAndTag is a ImageFailureCode enum value
  2460. ImageFailureCodeMissingDigestAndTag = "MissingDigestAndTag"
  2461. )
  2462. const (
  2463. // LayerAvailabilityAvailable is a LayerAvailability enum value
  2464. LayerAvailabilityAvailable = "AVAILABLE"
  2465. // LayerAvailabilityUnavailable is a LayerAvailability enum value
  2466. LayerAvailabilityUnavailable = "UNAVAILABLE"
  2467. )
  2468. const (
  2469. // LayerFailureCodeInvalidLayerDigest is a LayerFailureCode enum value
  2470. LayerFailureCodeInvalidLayerDigest = "InvalidLayerDigest"
  2471. // LayerFailureCodeMissingLayerDigest is a LayerFailureCode enum value
  2472. LayerFailureCodeMissingLayerDigest = "MissingLayerDigest"
  2473. )
  2474. const (
  2475. // TagStatusTagged is a TagStatus enum value
  2476. TagStatusTagged = "TAGGED"
  2477. // TagStatusUntagged is a TagStatus enum value
  2478. TagStatusUntagged = "UNTAGGED"
  2479. )