api.go 70 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114
  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. // Creating a request object using this method should be used when you want to inject
  16. // custom logic into the request's lifecycle using a custom handler, or if you want to
  17. // access properties on the request object before or after sending the request. If
  18. // you just want the service response, call the BatchCheckLayerAvailability method directly
  19. // instead.
  20. //
  21. // Note: You must call the "Send" method on the returned request object in order
  22. // to execute the request.
  23. //
  24. // // Example sending a request using the BatchCheckLayerAvailabilityRequest method.
  25. // req, resp := client.BatchCheckLayerAvailabilityRequest(params)
  26. //
  27. // err := req.Send()
  28. // if err == nil { // resp is now filled
  29. // fmt.Println(resp)
  30. // }
  31. //
  32. func (c *ECR) BatchCheckLayerAvailabilityRequest(input *BatchCheckLayerAvailabilityInput) (req *request.Request, output *BatchCheckLayerAvailabilityOutput) {
  33. op := &request.Operation{
  34. Name: opBatchCheckLayerAvailability,
  35. HTTPMethod: "POST",
  36. HTTPPath: "/",
  37. }
  38. if input == nil {
  39. input = &BatchCheckLayerAvailabilityInput{}
  40. }
  41. req = c.newRequest(op, input, output)
  42. output = &BatchCheckLayerAvailabilityOutput{}
  43. req.Data = output
  44. return
  45. }
  46. // Check the availability of multiple image layers in a specified registry and
  47. // repository.
  48. //
  49. // This operation is used by the Amazon ECR proxy, and it is not intended
  50. // for general use by customers. Use the docker CLI to pull, tag, and push images.
  51. func (c *ECR) BatchCheckLayerAvailability(input *BatchCheckLayerAvailabilityInput) (*BatchCheckLayerAvailabilityOutput, error) {
  52. req, out := c.BatchCheckLayerAvailabilityRequest(input)
  53. err := req.Send()
  54. return out, err
  55. }
  56. const opBatchDeleteImage = "BatchDeleteImage"
  57. // BatchDeleteImageRequest generates a "aws/request.Request" representing the
  58. // client's request for the BatchDeleteImage operation. The "output" return
  59. // value can be used to capture response data after the request's "Send" method
  60. // is called.
  61. //
  62. // Creating a request object using this method should be used when you want to inject
  63. // custom logic into the request's lifecycle using a custom handler, or if you want to
  64. // access properties on the request object before or after sending the request. If
  65. // you just want the service response, call the BatchDeleteImage method directly
  66. // instead.
  67. //
  68. // Note: You must call the "Send" method on the returned request object in order
  69. // to execute the request.
  70. //
  71. // // Example sending a request using the BatchDeleteImageRequest method.
  72. // req, resp := client.BatchDeleteImageRequest(params)
  73. //
  74. // err := req.Send()
  75. // if err == nil { // resp is now filled
  76. // fmt.Println(resp)
  77. // }
  78. //
  79. func (c *ECR) BatchDeleteImageRequest(input *BatchDeleteImageInput) (req *request.Request, output *BatchDeleteImageOutput) {
  80. op := &request.Operation{
  81. Name: opBatchDeleteImage,
  82. HTTPMethod: "POST",
  83. HTTPPath: "/",
  84. }
  85. if input == nil {
  86. input = &BatchDeleteImageInput{}
  87. }
  88. req = c.newRequest(op, input, output)
  89. output = &BatchDeleteImageOutput{}
  90. req.Data = output
  91. return
  92. }
  93. // Deletes a list of specified images within a specified repository. Images
  94. // are specified with either imageTag or imageDigest.
  95. func (c *ECR) BatchDeleteImage(input *BatchDeleteImageInput) (*BatchDeleteImageOutput, error) {
  96. req, out := c.BatchDeleteImageRequest(input)
  97. err := req.Send()
  98. return out, err
  99. }
  100. const opBatchGetImage = "BatchGetImage"
  101. // BatchGetImageRequest generates a "aws/request.Request" representing the
  102. // client's request for the BatchGetImage operation. The "output" return
  103. // value can be used to capture response data after the request's "Send" method
  104. // is called.
  105. //
  106. // Creating a request object using this method should be used when you want to inject
  107. // custom logic into the request's lifecycle using a custom handler, or if you want to
  108. // access properties on the request object before or after sending the request. If
  109. // you just want the service response, call the BatchGetImage method directly
  110. // instead.
  111. //
  112. // Note: You must call the "Send" method on the returned request object in order
  113. // to execute the request.
  114. //
  115. // // Example sending a request using the BatchGetImageRequest method.
  116. // req, resp := client.BatchGetImageRequest(params)
  117. //
  118. // err := req.Send()
  119. // if err == nil { // resp is now filled
  120. // fmt.Println(resp)
  121. // }
  122. //
  123. func (c *ECR) BatchGetImageRequest(input *BatchGetImageInput) (req *request.Request, output *BatchGetImageOutput) {
  124. op := &request.Operation{
  125. Name: opBatchGetImage,
  126. HTTPMethod: "POST",
  127. HTTPPath: "/",
  128. }
  129. if input == nil {
  130. input = &BatchGetImageInput{}
  131. }
  132. req = c.newRequest(op, input, output)
  133. output = &BatchGetImageOutput{}
  134. req.Data = output
  135. return
  136. }
  137. // Gets detailed information for specified images within a specified repository.
  138. // Images are specified with either imageTag or imageDigest.
  139. func (c *ECR) BatchGetImage(input *BatchGetImageInput) (*BatchGetImageOutput, error) {
  140. req, out := c.BatchGetImageRequest(input)
  141. err := req.Send()
  142. return out, err
  143. }
  144. const opCompleteLayerUpload = "CompleteLayerUpload"
  145. // CompleteLayerUploadRequest generates a "aws/request.Request" representing the
  146. // client's request for the CompleteLayerUpload operation. The "output" return
  147. // value can be used to capture response data after the request's "Send" method
  148. // is called.
  149. //
  150. // Creating a request object using this method should be used when you want to inject
  151. // custom logic into the request's lifecycle using a custom handler, or if you want to
  152. // access properties on the request object before or after sending the request. If
  153. // you just want the service response, call the CompleteLayerUpload method directly
  154. // instead.
  155. //
  156. // Note: You must call the "Send" method on the returned request object in order
  157. // to execute the request.
  158. //
  159. // // Example sending a request using the CompleteLayerUploadRequest method.
  160. // req, resp := client.CompleteLayerUploadRequest(params)
  161. //
  162. // err := req.Send()
  163. // if err == nil { // resp is now filled
  164. // fmt.Println(resp)
  165. // }
  166. //
  167. func (c *ECR) CompleteLayerUploadRequest(input *CompleteLayerUploadInput) (req *request.Request, output *CompleteLayerUploadOutput) {
  168. op := &request.Operation{
  169. Name: opCompleteLayerUpload,
  170. HTTPMethod: "POST",
  171. HTTPPath: "/",
  172. }
  173. if input == nil {
  174. input = &CompleteLayerUploadInput{}
  175. }
  176. req = c.newRequest(op, input, output)
  177. output = &CompleteLayerUploadOutput{}
  178. req.Data = output
  179. return
  180. }
  181. // Inform Amazon ECR that the image layer upload for a specified registry, repository
  182. // name, and upload ID, has completed. You can optionally provide a sha256 digest
  183. // of the image layer for data validation purposes.
  184. //
  185. // This operation is used by the Amazon ECR proxy, and it is not intended
  186. // for general use by customers. Use the docker CLI to pull, tag, and push images.
  187. func (c *ECR) CompleteLayerUpload(input *CompleteLayerUploadInput) (*CompleteLayerUploadOutput, error) {
  188. req, out := c.CompleteLayerUploadRequest(input)
  189. err := req.Send()
  190. return out, err
  191. }
  192. const opCreateRepository = "CreateRepository"
  193. // CreateRepositoryRequest generates a "aws/request.Request" representing the
  194. // client's request for the CreateRepository operation. The "output" return
  195. // value can be used to capture response data after the request's "Send" method
  196. // is called.
  197. //
  198. // Creating a request object using this method should be used when you want to inject
  199. // custom logic into the request's lifecycle using a custom handler, or if you want to
  200. // access properties on the request object before or after sending the request. If
  201. // you just want the service response, call the CreateRepository method directly
  202. // instead.
  203. //
  204. // Note: You must call the "Send" method on the returned request object in order
  205. // to execute the request.
  206. //
  207. // // Example sending a request using the CreateRepositoryRequest method.
  208. // req, resp := client.CreateRepositoryRequest(params)
  209. //
  210. // err := req.Send()
  211. // if err == nil { // resp is now filled
  212. // fmt.Println(resp)
  213. // }
  214. //
  215. func (c *ECR) CreateRepositoryRequest(input *CreateRepositoryInput) (req *request.Request, output *CreateRepositoryOutput) {
  216. op := &request.Operation{
  217. Name: opCreateRepository,
  218. HTTPMethod: "POST",
  219. HTTPPath: "/",
  220. }
  221. if input == nil {
  222. input = &CreateRepositoryInput{}
  223. }
  224. req = c.newRequest(op, input, output)
  225. output = &CreateRepositoryOutput{}
  226. req.Data = output
  227. return
  228. }
  229. // Creates an image repository.
  230. func (c *ECR) CreateRepository(input *CreateRepositoryInput) (*CreateRepositoryOutput, error) {
  231. req, out := c.CreateRepositoryRequest(input)
  232. err := req.Send()
  233. return out, err
  234. }
  235. const opDeleteRepository = "DeleteRepository"
  236. // DeleteRepositoryRequest generates a "aws/request.Request" representing the
  237. // client's request for the DeleteRepository operation. The "output" return
  238. // value can be used to capture response data after the request's "Send" method
  239. // is called.
  240. //
  241. // Creating a request object using this method should be used when you want to inject
  242. // custom logic into the request's lifecycle using a custom handler, or if you want to
  243. // access properties on the request object before or after sending the request. If
  244. // you just want the service response, call the DeleteRepository method directly
  245. // instead.
  246. //
  247. // Note: You must call the "Send" method on the returned request object in order
  248. // to execute the request.
  249. //
  250. // // Example sending a request using the DeleteRepositoryRequest method.
  251. // req, resp := client.DeleteRepositoryRequest(params)
  252. //
  253. // err := req.Send()
  254. // if err == nil { // resp is now filled
  255. // fmt.Println(resp)
  256. // }
  257. //
  258. func (c *ECR) DeleteRepositoryRequest(input *DeleteRepositoryInput) (req *request.Request, output *DeleteRepositoryOutput) {
  259. op := &request.Operation{
  260. Name: opDeleteRepository,
  261. HTTPMethod: "POST",
  262. HTTPPath: "/",
  263. }
  264. if input == nil {
  265. input = &DeleteRepositoryInput{}
  266. }
  267. req = c.newRequest(op, input, output)
  268. output = &DeleteRepositoryOutput{}
  269. req.Data = output
  270. return
  271. }
  272. // Deletes an existing image repository. If a repository contains images, you
  273. // must use the force option to delete it.
  274. func (c *ECR) DeleteRepository(input *DeleteRepositoryInput) (*DeleteRepositoryOutput, error) {
  275. req, out := c.DeleteRepositoryRequest(input)
  276. err := req.Send()
  277. return out, err
  278. }
  279. const opDeleteRepositoryPolicy = "DeleteRepositoryPolicy"
  280. // DeleteRepositoryPolicyRequest generates a "aws/request.Request" representing the
  281. // client's request for the DeleteRepositoryPolicy operation. The "output" return
  282. // value can be used to capture response data after the request's "Send" method
  283. // is called.
  284. //
  285. // Creating a request object using this method should be used when you want to inject
  286. // custom logic into the request's lifecycle using a custom handler, or if you want to
  287. // access properties on the request object before or after sending the request. If
  288. // you just want the service response, call the DeleteRepositoryPolicy method directly
  289. // instead.
  290. //
  291. // Note: You must call the "Send" method on the returned request object in order
  292. // to execute the request.
  293. //
  294. // // Example sending a request using the DeleteRepositoryPolicyRequest method.
  295. // req, resp := client.DeleteRepositoryPolicyRequest(params)
  296. //
  297. // err := req.Send()
  298. // if err == nil { // resp is now filled
  299. // fmt.Println(resp)
  300. // }
  301. //
  302. func (c *ECR) DeleteRepositoryPolicyRequest(input *DeleteRepositoryPolicyInput) (req *request.Request, output *DeleteRepositoryPolicyOutput) {
  303. op := &request.Operation{
  304. Name: opDeleteRepositoryPolicy,
  305. HTTPMethod: "POST",
  306. HTTPPath: "/",
  307. }
  308. if input == nil {
  309. input = &DeleteRepositoryPolicyInput{}
  310. }
  311. req = c.newRequest(op, input, output)
  312. output = &DeleteRepositoryPolicyOutput{}
  313. req.Data = output
  314. return
  315. }
  316. // Deletes the repository policy from a specified repository.
  317. func (c *ECR) DeleteRepositoryPolicy(input *DeleteRepositoryPolicyInput) (*DeleteRepositoryPolicyOutput, error) {
  318. req, out := c.DeleteRepositoryPolicyRequest(input)
  319. err := req.Send()
  320. return out, err
  321. }
  322. const opDescribeRepositories = "DescribeRepositories"
  323. // DescribeRepositoriesRequest generates a "aws/request.Request" representing the
  324. // client's request for the DescribeRepositories operation. The "output" return
  325. // value can be used to capture response data after the request's "Send" method
  326. // is called.
  327. //
  328. // Creating a request object using this method should be used when you want to inject
  329. // custom logic into the request's lifecycle using a custom handler, or if you want to
  330. // access properties on the request object before or after sending the request. If
  331. // you just want the service response, call the DescribeRepositories method directly
  332. // instead.
  333. //
  334. // Note: You must call the "Send" method on the returned request object in order
  335. // to execute the request.
  336. //
  337. // // Example sending a request using the DescribeRepositoriesRequest method.
  338. // req, resp := client.DescribeRepositoriesRequest(params)
  339. //
  340. // err := req.Send()
  341. // if err == nil { // resp is now filled
  342. // fmt.Println(resp)
  343. // }
  344. //
  345. func (c *ECR) DescribeRepositoriesRequest(input *DescribeRepositoriesInput) (req *request.Request, output *DescribeRepositoriesOutput) {
  346. op := &request.Operation{
  347. Name: opDescribeRepositories,
  348. HTTPMethod: "POST",
  349. HTTPPath: "/",
  350. }
  351. if input == nil {
  352. input = &DescribeRepositoriesInput{}
  353. }
  354. req = c.newRequest(op, input, output)
  355. output = &DescribeRepositoriesOutput{}
  356. req.Data = output
  357. return
  358. }
  359. // Describes image repositories in a registry.
  360. func (c *ECR) DescribeRepositories(input *DescribeRepositoriesInput) (*DescribeRepositoriesOutput, error) {
  361. req, out := c.DescribeRepositoriesRequest(input)
  362. err := req.Send()
  363. return out, err
  364. }
  365. const opGetAuthorizationToken = "GetAuthorizationToken"
  366. // GetAuthorizationTokenRequest generates a "aws/request.Request" representing the
  367. // client's request for the GetAuthorizationToken operation. The "output" return
  368. // value can be used to capture response data after the request's "Send" method
  369. // is called.
  370. //
  371. // Creating a request object using this method should be used when you want to inject
  372. // custom logic into the request's lifecycle using a custom handler, or if you want to
  373. // access properties on the request object before or after sending the request. If
  374. // you just want the service response, call the GetAuthorizationToken method directly
  375. // instead.
  376. //
  377. // Note: You must call the "Send" method on the returned request object in order
  378. // to execute the request.
  379. //
  380. // // Example sending a request using the GetAuthorizationTokenRequest method.
  381. // req, resp := client.GetAuthorizationTokenRequest(params)
  382. //
  383. // err := req.Send()
  384. // if err == nil { // resp is now filled
  385. // fmt.Println(resp)
  386. // }
  387. //
  388. func (c *ECR) GetAuthorizationTokenRequest(input *GetAuthorizationTokenInput) (req *request.Request, output *GetAuthorizationTokenOutput) {
  389. op := &request.Operation{
  390. Name: opGetAuthorizationToken,
  391. HTTPMethod: "POST",
  392. HTTPPath: "/",
  393. }
  394. if input == nil {
  395. input = &GetAuthorizationTokenInput{}
  396. }
  397. req = c.newRequest(op, input, output)
  398. output = &GetAuthorizationTokenOutput{}
  399. req.Data = output
  400. return
  401. }
  402. // Retrieves a token that is valid for a specified registry for 12 hours. This
  403. // command allows you to use the docker CLI to push and pull images with Amazon
  404. // ECR. If you do not specify a registry, the default registry is assumed.
  405. //
  406. // The authorizationToken returned for each registry specified is a base64
  407. // encoded string that can be decoded and used in a docker login command to
  408. // authenticate to a registry. The AWS CLI offers an aws ecr get-login command
  409. // that simplifies the login process.
  410. func (c *ECR) GetAuthorizationToken(input *GetAuthorizationTokenInput) (*GetAuthorizationTokenOutput, error) {
  411. req, out := c.GetAuthorizationTokenRequest(input)
  412. err := req.Send()
  413. return out, err
  414. }
  415. const opGetDownloadUrlForLayer = "GetDownloadUrlForLayer"
  416. // GetDownloadUrlForLayerRequest generates a "aws/request.Request" representing the
  417. // client's request for the GetDownloadUrlForLayer operation. The "output" return
  418. // value can be used to capture response data after the request's "Send" method
  419. // is called.
  420. //
  421. // Creating a request object using this method should be used when you want to inject
  422. // custom logic into the request's lifecycle using a custom handler, or if you want to
  423. // access properties on the request object before or after sending the request. If
  424. // you just want the service response, call the GetDownloadUrlForLayer method directly
  425. // instead.
  426. //
  427. // Note: You must call the "Send" method on the returned request object in order
  428. // to execute the request.
  429. //
  430. // // Example sending a request using the GetDownloadUrlForLayerRequest method.
  431. // req, resp := client.GetDownloadUrlForLayerRequest(params)
  432. //
  433. // err := req.Send()
  434. // if err == nil { // resp is now filled
  435. // fmt.Println(resp)
  436. // }
  437. //
  438. func (c *ECR) GetDownloadUrlForLayerRequest(input *GetDownloadUrlForLayerInput) (req *request.Request, output *GetDownloadUrlForLayerOutput) {
  439. op := &request.Operation{
  440. Name: opGetDownloadUrlForLayer,
  441. HTTPMethod: "POST",
  442. HTTPPath: "/",
  443. }
  444. if input == nil {
  445. input = &GetDownloadUrlForLayerInput{}
  446. }
  447. req = c.newRequest(op, input, output)
  448. output = &GetDownloadUrlForLayerOutput{}
  449. req.Data = output
  450. return
  451. }
  452. // Retrieves the pre-signed Amazon S3 download URL corresponding to an image
  453. // layer. You can only get URLs for image layers that are referenced in an image.
  454. //
  455. // This operation is used by the Amazon ECR proxy, and it is not intended
  456. // for general use by customers. Use the docker CLI to pull, tag, and push images.
  457. func (c *ECR) GetDownloadUrlForLayer(input *GetDownloadUrlForLayerInput) (*GetDownloadUrlForLayerOutput, error) {
  458. req, out := c.GetDownloadUrlForLayerRequest(input)
  459. err := req.Send()
  460. return out, err
  461. }
  462. const opGetRepositoryPolicy = "GetRepositoryPolicy"
  463. // GetRepositoryPolicyRequest generates a "aws/request.Request" representing the
  464. // client's request for the GetRepositoryPolicy operation. The "output" return
  465. // value can be used to capture response data after the request's "Send" method
  466. // is called.
  467. //
  468. // Creating a request object using this method should be used when you want to inject
  469. // custom logic into the request's lifecycle using a custom handler, or if you want to
  470. // access properties on the request object before or after sending the request. If
  471. // you just want the service response, call the GetRepositoryPolicy method directly
  472. // instead.
  473. //
  474. // Note: You must call the "Send" method on the returned request object in order
  475. // to execute the request.
  476. //
  477. // // Example sending a request using the GetRepositoryPolicyRequest method.
  478. // req, resp := client.GetRepositoryPolicyRequest(params)
  479. //
  480. // err := req.Send()
  481. // if err == nil { // resp is now filled
  482. // fmt.Println(resp)
  483. // }
  484. //
  485. func (c *ECR) GetRepositoryPolicyRequest(input *GetRepositoryPolicyInput) (req *request.Request, output *GetRepositoryPolicyOutput) {
  486. op := &request.Operation{
  487. Name: opGetRepositoryPolicy,
  488. HTTPMethod: "POST",
  489. HTTPPath: "/",
  490. }
  491. if input == nil {
  492. input = &GetRepositoryPolicyInput{}
  493. }
  494. req = c.newRequest(op, input, output)
  495. output = &GetRepositoryPolicyOutput{}
  496. req.Data = output
  497. return
  498. }
  499. // Retrieves the repository policy for a specified repository.
  500. func (c *ECR) GetRepositoryPolicy(input *GetRepositoryPolicyInput) (*GetRepositoryPolicyOutput, error) {
  501. req, out := c.GetRepositoryPolicyRequest(input)
  502. err := req.Send()
  503. return out, err
  504. }
  505. const opInitiateLayerUpload = "InitiateLayerUpload"
  506. // InitiateLayerUploadRequest generates a "aws/request.Request" representing the
  507. // client's request for the InitiateLayerUpload operation. The "output" return
  508. // value can be used to capture response data after the request's "Send" method
  509. // is called.
  510. //
  511. // Creating a request object using this method should be used when you want to inject
  512. // custom logic into the request's lifecycle using a custom handler, or if you want to
  513. // access properties on the request object before or after sending the request. If
  514. // you just want the service response, call the InitiateLayerUpload method directly
  515. // instead.
  516. //
  517. // Note: You must call the "Send" method on the returned request object in order
  518. // to execute the request.
  519. //
  520. // // Example sending a request using the InitiateLayerUploadRequest method.
  521. // req, resp := client.InitiateLayerUploadRequest(params)
  522. //
  523. // err := req.Send()
  524. // if err == nil { // resp is now filled
  525. // fmt.Println(resp)
  526. // }
  527. //
  528. func (c *ECR) InitiateLayerUploadRequest(input *InitiateLayerUploadInput) (req *request.Request, output *InitiateLayerUploadOutput) {
  529. op := &request.Operation{
  530. Name: opInitiateLayerUpload,
  531. HTTPMethod: "POST",
  532. HTTPPath: "/",
  533. }
  534. if input == nil {
  535. input = &InitiateLayerUploadInput{}
  536. }
  537. req = c.newRequest(op, input, output)
  538. output = &InitiateLayerUploadOutput{}
  539. req.Data = output
  540. return
  541. }
  542. // Notify Amazon ECR that you intend to upload an image layer.
  543. //
  544. // This operation is used by the Amazon ECR proxy, and it is not intended
  545. // for general use by customers. Use the docker CLI to pull, tag, and push images.
  546. func (c *ECR) InitiateLayerUpload(input *InitiateLayerUploadInput) (*InitiateLayerUploadOutput, error) {
  547. req, out := c.InitiateLayerUploadRequest(input)
  548. err := req.Send()
  549. return out, err
  550. }
  551. const opListImages = "ListImages"
  552. // ListImagesRequest generates a "aws/request.Request" representing the
  553. // client's request for the ListImages operation. The "output" return
  554. // value can be used to capture response data after the request's "Send" method
  555. // is called.
  556. //
  557. // Creating a request object using this method should be used when you want to inject
  558. // custom logic into the request's lifecycle using a custom handler, or if you want to
  559. // access properties on the request object before or after sending the request. If
  560. // you just want the service response, call the ListImages method directly
  561. // instead.
  562. //
  563. // Note: You must call the "Send" method on the returned request object in order
  564. // to execute the request.
  565. //
  566. // // Example sending a request using the ListImagesRequest method.
  567. // req, resp := client.ListImagesRequest(params)
  568. //
  569. // err := req.Send()
  570. // if err == nil { // resp is now filled
  571. // fmt.Println(resp)
  572. // }
  573. //
  574. func (c *ECR) ListImagesRequest(input *ListImagesInput) (req *request.Request, output *ListImagesOutput) {
  575. op := &request.Operation{
  576. Name: opListImages,
  577. HTTPMethod: "POST",
  578. HTTPPath: "/",
  579. }
  580. if input == nil {
  581. input = &ListImagesInput{}
  582. }
  583. req = c.newRequest(op, input, output)
  584. output = &ListImagesOutput{}
  585. req.Data = output
  586. return
  587. }
  588. // Lists all the image IDs for a given repository.
  589. func (c *ECR) ListImages(input *ListImagesInput) (*ListImagesOutput, error) {
  590. req, out := c.ListImagesRequest(input)
  591. err := req.Send()
  592. return out, err
  593. }
  594. const opPutImage = "PutImage"
  595. // PutImageRequest generates a "aws/request.Request" representing the
  596. // client's request for the PutImage operation. The "output" return
  597. // value can be used to capture response data after the request's "Send" method
  598. // is called.
  599. //
  600. // Creating a request object using this method should be used when you want to inject
  601. // custom logic into the request's lifecycle using a custom handler, or if you want to
  602. // access properties on the request object before or after sending the request. If
  603. // you just want the service response, call the PutImage method directly
  604. // instead.
  605. //
  606. // Note: You must call the "Send" method on the returned request object in order
  607. // to execute the request.
  608. //
  609. // // Example sending a request using the PutImageRequest method.
  610. // req, resp := client.PutImageRequest(params)
  611. //
  612. // err := req.Send()
  613. // if err == nil { // resp is now filled
  614. // fmt.Println(resp)
  615. // }
  616. //
  617. func (c *ECR) PutImageRequest(input *PutImageInput) (req *request.Request, output *PutImageOutput) {
  618. op := &request.Operation{
  619. Name: opPutImage,
  620. HTTPMethod: "POST",
  621. HTTPPath: "/",
  622. }
  623. if input == nil {
  624. input = &PutImageInput{}
  625. }
  626. req = c.newRequest(op, input, output)
  627. output = &PutImageOutput{}
  628. req.Data = output
  629. return
  630. }
  631. // Creates or updates the image manifest associated with an image.
  632. //
  633. // This operation is used by the Amazon ECR proxy, and it is not intended
  634. // for general use by customers. Use the docker CLI to pull, tag, and push images.
  635. func (c *ECR) PutImage(input *PutImageInput) (*PutImageOutput, error) {
  636. req, out := c.PutImageRequest(input)
  637. err := req.Send()
  638. return out, err
  639. }
  640. const opSetRepositoryPolicy = "SetRepositoryPolicy"
  641. // SetRepositoryPolicyRequest generates a "aws/request.Request" representing the
  642. // client's request for the SetRepositoryPolicy operation. The "output" return
  643. // value can be used to capture response data after the request's "Send" method
  644. // is called.
  645. //
  646. // Creating a request object using this method should be used when you want to inject
  647. // custom logic into the request's lifecycle using a custom handler, or if you want to
  648. // access properties on the request object before or after sending the request. If
  649. // you just want the service response, call the SetRepositoryPolicy method directly
  650. // instead.
  651. //
  652. // Note: You must call the "Send" method on the returned request object in order
  653. // to execute the request.
  654. //
  655. // // Example sending a request using the SetRepositoryPolicyRequest method.
  656. // req, resp := client.SetRepositoryPolicyRequest(params)
  657. //
  658. // err := req.Send()
  659. // if err == nil { // resp is now filled
  660. // fmt.Println(resp)
  661. // }
  662. //
  663. func (c *ECR) SetRepositoryPolicyRequest(input *SetRepositoryPolicyInput) (req *request.Request, output *SetRepositoryPolicyOutput) {
  664. op := &request.Operation{
  665. Name: opSetRepositoryPolicy,
  666. HTTPMethod: "POST",
  667. HTTPPath: "/",
  668. }
  669. if input == nil {
  670. input = &SetRepositoryPolicyInput{}
  671. }
  672. req = c.newRequest(op, input, output)
  673. output = &SetRepositoryPolicyOutput{}
  674. req.Data = output
  675. return
  676. }
  677. // Applies a repository policy on a specified repository to control access permissions.
  678. func (c *ECR) SetRepositoryPolicy(input *SetRepositoryPolicyInput) (*SetRepositoryPolicyOutput, error) {
  679. req, out := c.SetRepositoryPolicyRequest(input)
  680. err := req.Send()
  681. return out, err
  682. }
  683. const opUploadLayerPart = "UploadLayerPart"
  684. // UploadLayerPartRequest generates a "aws/request.Request" representing the
  685. // client's request for the UploadLayerPart operation. The "output" return
  686. // value can be used to capture response data after the request's "Send" method
  687. // is called.
  688. //
  689. // Creating a request object using this method should be used when you want to inject
  690. // custom logic into the request's lifecycle using a custom handler, or if you want to
  691. // access properties on the request object before or after sending the request. If
  692. // you just want the service response, call the UploadLayerPart method directly
  693. // instead.
  694. //
  695. // Note: You must call the "Send" method on the returned request object in order
  696. // to execute the request.
  697. //
  698. // // Example sending a request using the UploadLayerPartRequest method.
  699. // req, resp := client.UploadLayerPartRequest(params)
  700. //
  701. // err := req.Send()
  702. // if err == nil { // resp is now filled
  703. // fmt.Println(resp)
  704. // }
  705. //
  706. func (c *ECR) UploadLayerPartRequest(input *UploadLayerPartInput) (req *request.Request, output *UploadLayerPartOutput) {
  707. op := &request.Operation{
  708. Name: opUploadLayerPart,
  709. HTTPMethod: "POST",
  710. HTTPPath: "/",
  711. }
  712. if input == nil {
  713. input = &UploadLayerPartInput{}
  714. }
  715. req = c.newRequest(op, input, output)
  716. output = &UploadLayerPartOutput{}
  717. req.Data = output
  718. return
  719. }
  720. // Uploads an image layer part to Amazon ECR.
  721. //
  722. // This operation is used by the Amazon ECR proxy, and it is not intended
  723. // for general use by customers. Use the docker CLI to pull, tag, and push images.
  724. func (c *ECR) UploadLayerPart(input *UploadLayerPartInput) (*UploadLayerPartOutput, error) {
  725. req, out := c.UploadLayerPartRequest(input)
  726. err := req.Send()
  727. return out, err
  728. }
  729. // An object representing authorization data for an Amazon ECR registry.
  730. type AuthorizationData struct {
  731. _ struct{} `type:"structure"`
  732. // A base64-encoded string that contains authorization data for the specified
  733. // Amazon ECR registry. When the string is decoded, it is presented in the format
  734. // user:password for private registry authentication using docker login.
  735. AuthorizationToken *string `locationName:"authorizationToken" type:"string"`
  736. // The Unix time in seconds and milliseconds when the authorization token expires.
  737. // Authorization tokens are valid for 12 hours.
  738. ExpiresAt *time.Time `locationName:"expiresAt" type:"timestamp" timestampFormat:"unix"`
  739. // The registry URL to use for this authorization token in a docker login command.
  740. // The Amazon ECR registry URL format is https://aws_account_id.dkr.ecr.region.amazonaws.com.
  741. // For example, https://012345678910.dkr.ecr.us-east-1.amazonaws.com..
  742. ProxyEndpoint *string `locationName:"proxyEndpoint" type:"string"`
  743. }
  744. // String returns the string representation
  745. func (s AuthorizationData) String() string {
  746. return awsutil.Prettify(s)
  747. }
  748. // GoString returns the string representation
  749. func (s AuthorizationData) GoString() string {
  750. return s.String()
  751. }
  752. type BatchCheckLayerAvailabilityInput struct {
  753. _ struct{} `type:"structure"`
  754. // The digests of the image layers to check.
  755. LayerDigests []*string `locationName:"layerDigests" min:"1" type:"list" required:"true"`
  756. // The AWS account ID associated with the registry that contains the image layers
  757. // to check. If you do not specify a registry, the default registry is assumed.
  758. RegistryId *string `locationName:"registryId" type:"string"`
  759. // The name of the repository that is associated with the image layers to check.
  760. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  761. }
  762. // String returns the string representation
  763. func (s BatchCheckLayerAvailabilityInput) String() string {
  764. return awsutil.Prettify(s)
  765. }
  766. // GoString returns the string representation
  767. func (s BatchCheckLayerAvailabilityInput) GoString() string {
  768. return s.String()
  769. }
  770. // Validate inspects the fields of the type to determine if they are valid.
  771. func (s *BatchCheckLayerAvailabilityInput) Validate() error {
  772. invalidParams := request.ErrInvalidParams{Context: "BatchCheckLayerAvailabilityInput"}
  773. if s.LayerDigests == nil {
  774. invalidParams.Add(request.NewErrParamRequired("LayerDigests"))
  775. }
  776. if s.LayerDigests != nil && len(s.LayerDigests) < 1 {
  777. invalidParams.Add(request.NewErrParamMinLen("LayerDigests", 1))
  778. }
  779. if s.RepositoryName == nil {
  780. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  781. }
  782. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  783. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  784. }
  785. if invalidParams.Len() > 0 {
  786. return invalidParams
  787. }
  788. return nil
  789. }
  790. type BatchCheckLayerAvailabilityOutput struct {
  791. _ struct{} `type:"structure"`
  792. // Any failures associated with the call.
  793. Failures []*LayerFailure `locationName:"failures" type:"list"`
  794. // A list of image layer objects corresponding to the image layer references
  795. // in the request.
  796. Layers []*Layer `locationName:"layers" type:"list"`
  797. }
  798. // String returns the string representation
  799. func (s BatchCheckLayerAvailabilityOutput) String() string {
  800. return awsutil.Prettify(s)
  801. }
  802. // GoString returns the string representation
  803. func (s BatchCheckLayerAvailabilityOutput) GoString() string {
  804. return s.String()
  805. }
  806. // Deletes specified images within a specified repository. Images are specified
  807. // with either the imageTag or imageDigest.
  808. type BatchDeleteImageInput struct {
  809. _ struct{} `type:"structure"`
  810. // A list of image ID references that correspond to images to delete. The format
  811. // of the imageIds reference is imageTag=tag or imageDigest=digest.
  812. ImageIds []*ImageIdentifier `locationName:"imageIds" min:"1" type:"list" required:"true"`
  813. // The AWS account ID associated with the registry that contains the image to
  814. // delete. If you do not specify a registry, the default registry is assumed.
  815. RegistryId *string `locationName:"registryId" type:"string"`
  816. // The repository that contains the image to delete.
  817. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  818. }
  819. // String returns the string representation
  820. func (s BatchDeleteImageInput) String() string {
  821. return awsutil.Prettify(s)
  822. }
  823. // GoString returns the string representation
  824. func (s BatchDeleteImageInput) GoString() string {
  825. return s.String()
  826. }
  827. // Validate inspects the fields of the type to determine if they are valid.
  828. func (s *BatchDeleteImageInput) Validate() error {
  829. invalidParams := request.ErrInvalidParams{Context: "BatchDeleteImageInput"}
  830. if s.ImageIds == nil {
  831. invalidParams.Add(request.NewErrParamRequired("ImageIds"))
  832. }
  833. if s.ImageIds != nil && len(s.ImageIds) < 1 {
  834. invalidParams.Add(request.NewErrParamMinLen("ImageIds", 1))
  835. }
  836. if s.RepositoryName == nil {
  837. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  838. }
  839. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  840. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  841. }
  842. if invalidParams.Len() > 0 {
  843. return invalidParams
  844. }
  845. return nil
  846. }
  847. type BatchDeleteImageOutput struct {
  848. _ struct{} `type:"structure"`
  849. // Any failures associated with the call.
  850. Failures []*ImageFailure `locationName:"failures" type:"list"`
  851. // The image IDs of the deleted images.
  852. ImageIds []*ImageIdentifier `locationName:"imageIds" min:"1" type:"list"`
  853. }
  854. // String returns the string representation
  855. func (s BatchDeleteImageOutput) String() string {
  856. return awsutil.Prettify(s)
  857. }
  858. // GoString returns the string representation
  859. func (s BatchDeleteImageOutput) GoString() string {
  860. return s.String()
  861. }
  862. type BatchGetImageInput struct {
  863. _ struct{} `type:"structure"`
  864. // A list of image ID references that correspond to images to describe. The
  865. // format of the imageIds reference is imageTag=tag or imageDigest=digest.
  866. ImageIds []*ImageIdentifier `locationName:"imageIds" min:"1" type:"list" required:"true"`
  867. // The AWS account ID associated with the registry that contains the images
  868. // to describe. If you do not specify a registry, the default registry is assumed.
  869. RegistryId *string `locationName:"registryId" type:"string"`
  870. // The repository that contains the images to describe.
  871. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  872. }
  873. // String returns the string representation
  874. func (s BatchGetImageInput) String() string {
  875. return awsutil.Prettify(s)
  876. }
  877. // GoString returns the string representation
  878. func (s BatchGetImageInput) GoString() string {
  879. return s.String()
  880. }
  881. // Validate inspects the fields of the type to determine if they are valid.
  882. func (s *BatchGetImageInput) Validate() error {
  883. invalidParams := request.ErrInvalidParams{Context: "BatchGetImageInput"}
  884. if s.ImageIds == nil {
  885. invalidParams.Add(request.NewErrParamRequired("ImageIds"))
  886. }
  887. if s.ImageIds != nil && len(s.ImageIds) < 1 {
  888. invalidParams.Add(request.NewErrParamMinLen("ImageIds", 1))
  889. }
  890. if s.RepositoryName == nil {
  891. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  892. }
  893. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  894. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  895. }
  896. if invalidParams.Len() > 0 {
  897. return invalidParams
  898. }
  899. return nil
  900. }
  901. type BatchGetImageOutput struct {
  902. _ struct{} `type:"structure"`
  903. // Any failures associated with the call.
  904. Failures []*ImageFailure `locationName:"failures" type:"list"`
  905. // A list of image objects corresponding to the image references in the request.
  906. Images []*Image `locationName:"images" type:"list"`
  907. }
  908. // String returns the string representation
  909. func (s BatchGetImageOutput) String() string {
  910. return awsutil.Prettify(s)
  911. }
  912. // GoString returns the string representation
  913. func (s BatchGetImageOutput) GoString() string {
  914. return s.String()
  915. }
  916. type CompleteLayerUploadInput struct {
  917. _ struct{} `type:"structure"`
  918. // The sha256 digest of the image layer.
  919. LayerDigests []*string `locationName:"layerDigests" min:"1" type:"list" required:"true"`
  920. // The AWS account ID associated with the registry to which to upload layers.
  921. // If you do not specify a registry, the default registry is assumed.
  922. RegistryId *string `locationName:"registryId" type:"string"`
  923. // The name of the repository to associate with the image layer.
  924. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  925. // The upload ID from a previous InitiateLayerUpload operation to associate
  926. // with the image layer.
  927. UploadId *string `locationName:"uploadId" type:"string" required:"true"`
  928. }
  929. // String returns the string representation
  930. func (s CompleteLayerUploadInput) String() string {
  931. return awsutil.Prettify(s)
  932. }
  933. // GoString returns the string representation
  934. func (s CompleteLayerUploadInput) GoString() string {
  935. return s.String()
  936. }
  937. // Validate inspects the fields of the type to determine if they are valid.
  938. func (s *CompleteLayerUploadInput) Validate() error {
  939. invalidParams := request.ErrInvalidParams{Context: "CompleteLayerUploadInput"}
  940. if s.LayerDigests == nil {
  941. invalidParams.Add(request.NewErrParamRequired("LayerDigests"))
  942. }
  943. if s.LayerDigests != nil && len(s.LayerDigests) < 1 {
  944. invalidParams.Add(request.NewErrParamMinLen("LayerDigests", 1))
  945. }
  946. if s.RepositoryName == nil {
  947. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  948. }
  949. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  950. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  951. }
  952. if s.UploadId == nil {
  953. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  954. }
  955. if invalidParams.Len() > 0 {
  956. return invalidParams
  957. }
  958. return nil
  959. }
  960. type CompleteLayerUploadOutput struct {
  961. _ struct{} `type:"structure"`
  962. // The sha256 digest of the image layer.
  963. LayerDigest *string `locationName:"layerDigest" type:"string"`
  964. // The registry ID associated with the request.
  965. RegistryId *string `locationName:"registryId" type:"string"`
  966. // The repository name associated with the request.
  967. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"`
  968. // The upload ID associated with the layer.
  969. UploadId *string `locationName:"uploadId" type:"string"`
  970. }
  971. // String returns the string representation
  972. func (s CompleteLayerUploadOutput) String() string {
  973. return awsutil.Prettify(s)
  974. }
  975. // GoString returns the string representation
  976. func (s CompleteLayerUploadOutput) GoString() string {
  977. return s.String()
  978. }
  979. type CreateRepositoryInput struct {
  980. _ struct{} `type:"structure"`
  981. // The name to use for the repository. The repository name may be specified
  982. // on its own (such as nginx-web-app) or it can be prepended with a namespace
  983. // to group the repository into a category (such as project-a/nginx-web-app).
  984. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  985. }
  986. // String returns the string representation
  987. func (s CreateRepositoryInput) String() string {
  988. return awsutil.Prettify(s)
  989. }
  990. // GoString returns the string representation
  991. func (s CreateRepositoryInput) GoString() string {
  992. return s.String()
  993. }
  994. // Validate inspects the fields of the type to determine if they are valid.
  995. func (s *CreateRepositoryInput) Validate() error {
  996. invalidParams := request.ErrInvalidParams{Context: "CreateRepositoryInput"}
  997. if s.RepositoryName == nil {
  998. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  999. }
  1000. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  1001. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  1002. }
  1003. if invalidParams.Len() > 0 {
  1004. return invalidParams
  1005. }
  1006. return nil
  1007. }
  1008. type CreateRepositoryOutput struct {
  1009. _ struct{} `type:"structure"`
  1010. // An object representing a repository.
  1011. Repository *Repository `locationName:"repository" type:"structure"`
  1012. }
  1013. // String returns the string representation
  1014. func (s CreateRepositoryOutput) String() string {
  1015. return awsutil.Prettify(s)
  1016. }
  1017. // GoString returns the string representation
  1018. func (s CreateRepositoryOutput) GoString() string {
  1019. return s.String()
  1020. }
  1021. type DeleteRepositoryInput struct {
  1022. _ struct{} `type:"structure"`
  1023. // Force the deletion of the repository if it contains images.
  1024. Force *bool `locationName:"force" type:"boolean"`
  1025. // The AWS account ID associated with the registry that contains the repository
  1026. // to delete. If you do not specify a registry, the default registry is assumed.
  1027. RegistryId *string `locationName:"registryId" type:"string"`
  1028. // The name of the repository to delete.
  1029. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  1030. }
  1031. // String returns the string representation
  1032. func (s DeleteRepositoryInput) String() string {
  1033. return awsutil.Prettify(s)
  1034. }
  1035. // GoString returns the string representation
  1036. func (s DeleteRepositoryInput) GoString() string {
  1037. return s.String()
  1038. }
  1039. // Validate inspects the fields of the type to determine if they are valid.
  1040. func (s *DeleteRepositoryInput) Validate() error {
  1041. invalidParams := request.ErrInvalidParams{Context: "DeleteRepositoryInput"}
  1042. if s.RepositoryName == nil {
  1043. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  1044. }
  1045. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  1046. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  1047. }
  1048. if invalidParams.Len() > 0 {
  1049. return invalidParams
  1050. }
  1051. return nil
  1052. }
  1053. type DeleteRepositoryOutput struct {
  1054. _ struct{} `type:"structure"`
  1055. // An object representing a repository.
  1056. Repository *Repository `locationName:"repository" type:"structure"`
  1057. }
  1058. // String returns the string representation
  1059. func (s DeleteRepositoryOutput) String() string {
  1060. return awsutil.Prettify(s)
  1061. }
  1062. // GoString returns the string representation
  1063. func (s DeleteRepositoryOutput) GoString() string {
  1064. return s.String()
  1065. }
  1066. type DeleteRepositoryPolicyInput struct {
  1067. _ struct{} `type:"structure"`
  1068. // The AWS account ID associated with the registry that contains the repository
  1069. // policy to delete. If you do not specify a registry, the default registry
  1070. // is assumed.
  1071. RegistryId *string `locationName:"registryId" type:"string"`
  1072. // The name of the repository that is associated with the repository policy
  1073. // to delete.
  1074. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  1075. }
  1076. // String returns the string representation
  1077. func (s DeleteRepositoryPolicyInput) String() string {
  1078. return awsutil.Prettify(s)
  1079. }
  1080. // GoString returns the string representation
  1081. func (s DeleteRepositoryPolicyInput) GoString() string {
  1082. return s.String()
  1083. }
  1084. // Validate inspects the fields of the type to determine if they are valid.
  1085. func (s *DeleteRepositoryPolicyInput) Validate() error {
  1086. invalidParams := request.ErrInvalidParams{Context: "DeleteRepositoryPolicyInput"}
  1087. if s.RepositoryName == nil {
  1088. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  1089. }
  1090. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  1091. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  1092. }
  1093. if invalidParams.Len() > 0 {
  1094. return invalidParams
  1095. }
  1096. return nil
  1097. }
  1098. type DeleteRepositoryPolicyOutput struct {
  1099. _ struct{} `type:"structure"`
  1100. // The JSON repository policy that was deleted from the repository.
  1101. PolicyText *string `locationName:"policyText" type:"string"`
  1102. // The registry ID associated with the request.
  1103. RegistryId *string `locationName:"registryId" type:"string"`
  1104. // The repository name associated with the request.
  1105. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"`
  1106. }
  1107. // String returns the string representation
  1108. func (s DeleteRepositoryPolicyOutput) String() string {
  1109. return awsutil.Prettify(s)
  1110. }
  1111. // GoString returns the string representation
  1112. func (s DeleteRepositoryPolicyOutput) GoString() string {
  1113. return s.String()
  1114. }
  1115. type DescribeRepositoriesInput struct {
  1116. _ struct{} `type:"structure"`
  1117. // The maximum number of repository results returned by DescribeRepositories
  1118. // in paginated output. When this parameter is used, DescribeRepositories only
  1119. // returns maxResults results in a single page along with a nextToken response
  1120. // element. The remaining results of the initial request can be seen by sending
  1121. // another DescribeRepositories request with the returned nextToken value. This
  1122. // value can be between 1 and 100. If this parameter is not used, then DescribeRepositories
  1123. // returns up to 100 results and a nextToken value, if applicable.
  1124. MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"`
  1125. // The nextToken value returned from a previous paginated DescribeRepositories
  1126. // request where maxResults was used and the results exceeded the value of that
  1127. // parameter. Pagination continues from the end of the previous results that
  1128. // returned the nextToken value. This value is null when there are no more results
  1129. // to return.
  1130. //
  1131. // This token should be treated as an opaque identifier that is only used
  1132. // to retrieve the next items in a list and not for other programmatic purposes.
  1133. NextToken *string `locationName:"nextToken" type:"string"`
  1134. // The AWS account ID associated with the registry that contains the repositories
  1135. // to be described. If you do not specify a registry, the default registry is
  1136. // assumed.
  1137. RegistryId *string `locationName:"registryId" type:"string"`
  1138. // A list of repositories to describe. If this parameter is omitted, then all
  1139. // repositories in a registry are described.
  1140. RepositoryNames []*string `locationName:"repositoryNames" min:"1" type:"list"`
  1141. }
  1142. // String returns the string representation
  1143. func (s DescribeRepositoriesInput) String() string {
  1144. return awsutil.Prettify(s)
  1145. }
  1146. // GoString returns the string representation
  1147. func (s DescribeRepositoriesInput) GoString() string {
  1148. return s.String()
  1149. }
  1150. // Validate inspects the fields of the type to determine if they are valid.
  1151. func (s *DescribeRepositoriesInput) Validate() error {
  1152. invalidParams := request.ErrInvalidParams{Context: "DescribeRepositoriesInput"}
  1153. if s.MaxResults != nil && *s.MaxResults < 1 {
  1154. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  1155. }
  1156. if s.RepositoryNames != nil && len(s.RepositoryNames) < 1 {
  1157. invalidParams.Add(request.NewErrParamMinLen("RepositoryNames", 1))
  1158. }
  1159. if invalidParams.Len() > 0 {
  1160. return invalidParams
  1161. }
  1162. return nil
  1163. }
  1164. type DescribeRepositoriesOutput struct {
  1165. _ struct{} `type:"structure"`
  1166. // The nextToken value to include in a future DescribeRepositories request.
  1167. // When the results of a DescribeRepositories request exceed maxResults, this
  1168. // value can be used to retrieve the next page of results. This value is null
  1169. // when there are no more results to return.
  1170. NextToken *string `locationName:"nextToken" type:"string"`
  1171. // A list of repository objects corresponding to valid repositories.
  1172. Repositories []*Repository `locationName:"repositories" type:"list"`
  1173. }
  1174. // String returns the string representation
  1175. func (s DescribeRepositoriesOutput) String() string {
  1176. return awsutil.Prettify(s)
  1177. }
  1178. // GoString returns the string representation
  1179. func (s DescribeRepositoriesOutput) GoString() string {
  1180. return s.String()
  1181. }
  1182. type GetAuthorizationTokenInput struct {
  1183. _ struct{} `type:"structure"`
  1184. // A list of AWS account IDs that are associated with the registries for which
  1185. // to get authorization tokens. If you do not specify a registry, the default
  1186. // registry is assumed.
  1187. RegistryIds []*string `locationName:"registryIds" min:"1" type:"list"`
  1188. }
  1189. // String returns the string representation
  1190. func (s GetAuthorizationTokenInput) String() string {
  1191. return awsutil.Prettify(s)
  1192. }
  1193. // GoString returns the string representation
  1194. func (s GetAuthorizationTokenInput) GoString() string {
  1195. return s.String()
  1196. }
  1197. // Validate inspects the fields of the type to determine if they are valid.
  1198. func (s *GetAuthorizationTokenInput) Validate() error {
  1199. invalidParams := request.ErrInvalidParams{Context: "GetAuthorizationTokenInput"}
  1200. if s.RegistryIds != nil && len(s.RegistryIds) < 1 {
  1201. invalidParams.Add(request.NewErrParamMinLen("RegistryIds", 1))
  1202. }
  1203. if invalidParams.Len() > 0 {
  1204. return invalidParams
  1205. }
  1206. return nil
  1207. }
  1208. type GetAuthorizationTokenOutput struct {
  1209. _ struct{} `type:"structure"`
  1210. // A list of authorization token data objects that correspond to the registryIds
  1211. // values in the request.
  1212. AuthorizationData []*AuthorizationData `locationName:"authorizationData" type:"list"`
  1213. }
  1214. // String returns the string representation
  1215. func (s GetAuthorizationTokenOutput) String() string {
  1216. return awsutil.Prettify(s)
  1217. }
  1218. // GoString returns the string representation
  1219. func (s GetAuthorizationTokenOutput) GoString() string {
  1220. return s.String()
  1221. }
  1222. type GetDownloadUrlForLayerInput struct {
  1223. _ struct{} `type:"structure"`
  1224. // The digest of the image layer to download.
  1225. LayerDigest *string `locationName:"layerDigest" type:"string" required:"true"`
  1226. // The AWS account ID associated with the registry that contains the image layer
  1227. // to download. If you do not specify a registry, the default registry is assumed.
  1228. RegistryId *string `locationName:"registryId" type:"string"`
  1229. // The name of the repository that is associated with the image layer to download.
  1230. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  1231. }
  1232. // String returns the string representation
  1233. func (s GetDownloadUrlForLayerInput) String() string {
  1234. return awsutil.Prettify(s)
  1235. }
  1236. // GoString returns the string representation
  1237. func (s GetDownloadUrlForLayerInput) GoString() string {
  1238. return s.String()
  1239. }
  1240. // Validate inspects the fields of the type to determine if they are valid.
  1241. func (s *GetDownloadUrlForLayerInput) Validate() error {
  1242. invalidParams := request.ErrInvalidParams{Context: "GetDownloadUrlForLayerInput"}
  1243. if s.LayerDigest == nil {
  1244. invalidParams.Add(request.NewErrParamRequired("LayerDigest"))
  1245. }
  1246. if s.RepositoryName == nil {
  1247. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  1248. }
  1249. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  1250. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  1251. }
  1252. if invalidParams.Len() > 0 {
  1253. return invalidParams
  1254. }
  1255. return nil
  1256. }
  1257. type GetDownloadUrlForLayerOutput struct {
  1258. _ struct{} `type:"structure"`
  1259. // The pre-signed Amazon S3 download URL for the requested layer.
  1260. DownloadUrl *string `locationName:"downloadUrl" type:"string"`
  1261. // The digest of the image layer to download.
  1262. LayerDigest *string `locationName:"layerDigest" type:"string"`
  1263. }
  1264. // String returns the string representation
  1265. func (s GetDownloadUrlForLayerOutput) String() string {
  1266. return awsutil.Prettify(s)
  1267. }
  1268. // GoString returns the string representation
  1269. func (s GetDownloadUrlForLayerOutput) GoString() string {
  1270. return s.String()
  1271. }
  1272. type GetRepositoryPolicyInput struct {
  1273. _ struct{} `type:"structure"`
  1274. // The AWS account ID associated with the registry that contains the repository.
  1275. // If you do not specify a registry, the default registry is assumed.
  1276. RegistryId *string `locationName:"registryId" type:"string"`
  1277. // The name of the repository whose policy you want to retrieve.
  1278. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  1279. }
  1280. // String returns the string representation
  1281. func (s GetRepositoryPolicyInput) String() string {
  1282. return awsutil.Prettify(s)
  1283. }
  1284. // GoString returns the string representation
  1285. func (s GetRepositoryPolicyInput) GoString() string {
  1286. return s.String()
  1287. }
  1288. // Validate inspects the fields of the type to determine if they are valid.
  1289. func (s *GetRepositoryPolicyInput) Validate() error {
  1290. invalidParams := request.ErrInvalidParams{Context: "GetRepositoryPolicyInput"}
  1291. if s.RepositoryName == nil {
  1292. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  1293. }
  1294. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  1295. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  1296. }
  1297. if invalidParams.Len() > 0 {
  1298. return invalidParams
  1299. }
  1300. return nil
  1301. }
  1302. type GetRepositoryPolicyOutput struct {
  1303. _ struct{} `type:"structure"`
  1304. // The JSON repository policy text associated with the repository.
  1305. PolicyText *string `locationName:"policyText" type:"string"`
  1306. // The registry ID associated with the request.
  1307. RegistryId *string `locationName:"registryId" type:"string"`
  1308. // The repository name associated with the request.
  1309. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"`
  1310. }
  1311. // String returns the string representation
  1312. func (s GetRepositoryPolicyOutput) String() string {
  1313. return awsutil.Prettify(s)
  1314. }
  1315. // GoString returns the string representation
  1316. func (s GetRepositoryPolicyOutput) GoString() string {
  1317. return s.String()
  1318. }
  1319. // An object representing an Amazon ECR image.
  1320. type Image struct {
  1321. _ struct{} `type:"structure"`
  1322. // An object containing the image tag and image digest associated with an image.
  1323. ImageId *ImageIdentifier `locationName:"imageId" type:"structure"`
  1324. // The image manifest associated with the image.
  1325. ImageManifest *string `locationName:"imageManifest" type:"string"`
  1326. // The AWS account ID associated with the registry containing the image.
  1327. RegistryId *string `locationName:"registryId" type:"string"`
  1328. // The name of the repository associated with the image.
  1329. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"`
  1330. }
  1331. // String returns the string representation
  1332. func (s Image) String() string {
  1333. return awsutil.Prettify(s)
  1334. }
  1335. // GoString returns the string representation
  1336. func (s Image) GoString() string {
  1337. return s.String()
  1338. }
  1339. // An object representing an Amazon ECR image failure.
  1340. type ImageFailure struct {
  1341. _ struct{} `type:"structure"`
  1342. // The code associated with the failure.
  1343. FailureCode *string `locationName:"failureCode" type:"string" enum:"ImageFailureCode"`
  1344. // The reason for the failure.
  1345. FailureReason *string `locationName:"failureReason" type:"string"`
  1346. // The image ID associated with the failure.
  1347. ImageId *ImageIdentifier `locationName:"imageId" type:"structure"`
  1348. }
  1349. // String returns the string representation
  1350. func (s ImageFailure) String() string {
  1351. return awsutil.Prettify(s)
  1352. }
  1353. // GoString returns the string representation
  1354. func (s ImageFailure) GoString() string {
  1355. return s.String()
  1356. }
  1357. // An object with identifying information for an Amazon ECR image.
  1358. type ImageIdentifier struct {
  1359. _ struct{} `type:"structure"`
  1360. // The sha256 digest of the image manifest.
  1361. ImageDigest *string `locationName:"imageDigest" type:"string"`
  1362. // The tag used for the image.
  1363. ImageTag *string `locationName:"imageTag" type:"string"`
  1364. }
  1365. // String returns the string representation
  1366. func (s ImageIdentifier) String() string {
  1367. return awsutil.Prettify(s)
  1368. }
  1369. // GoString returns the string representation
  1370. func (s ImageIdentifier) GoString() string {
  1371. return s.String()
  1372. }
  1373. type InitiateLayerUploadInput struct {
  1374. _ struct{} `type:"structure"`
  1375. // The AWS account ID associated with the registry that you intend to upload
  1376. // layers to. If you do not specify a registry, the default registry is assumed.
  1377. RegistryId *string `locationName:"registryId" type:"string"`
  1378. // The name of the repository that you intend to upload layers to.
  1379. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  1380. }
  1381. // String returns the string representation
  1382. func (s InitiateLayerUploadInput) String() string {
  1383. return awsutil.Prettify(s)
  1384. }
  1385. // GoString returns the string representation
  1386. func (s InitiateLayerUploadInput) GoString() string {
  1387. return s.String()
  1388. }
  1389. // Validate inspects the fields of the type to determine if they are valid.
  1390. func (s *InitiateLayerUploadInput) Validate() error {
  1391. invalidParams := request.ErrInvalidParams{Context: "InitiateLayerUploadInput"}
  1392. if s.RepositoryName == nil {
  1393. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  1394. }
  1395. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  1396. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  1397. }
  1398. if invalidParams.Len() > 0 {
  1399. return invalidParams
  1400. }
  1401. return nil
  1402. }
  1403. type InitiateLayerUploadOutput struct {
  1404. _ struct{} `type:"structure"`
  1405. // The size, in bytes, that Amazon ECR expects future layer part uploads to
  1406. // be.
  1407. PartSize *int64 `locationName:"partSize" type:"long"`
  1408. // The upload ID for the layer upload. This parameter is passed to further UploadLayerPart
  1409. // and CompleteLayerUpload operations.
  1410. UploadId *string `locationName:"uploadId" type:"string"`
  1411. }
  1412. // String returns the string representation
  1413. func (s InitiateLayerUploadOutput) String() string {
  1414. return awsutil.Prettify(s)
  1415. }
  1416. // GoString returns the string representation
  1417. func (s InitiateLayerUploadOutput) GoString() string {
  1418. return s.String()
  1419. }
  1420. // An object representing an Amazon ECR image layer.
  1421. type Layer struct {
  1422. _ struct{} `type:"structure"`
  1423. // The availability status of the image layer. Valid values are AVAILABLE and
  1424. // UNAVAILABLE.
  1425. LayerAvailability *string `locationName:"layerAvailability" type:"string" enum:"LayerAvailability"`
  1426. // The sha256 digest of the image layer.
  1427. LayerDigest *string `locationName:"layerDigest" type:"string"`
  1428. // The size, in bytes, of the image layer.
  1429. LayerSize *int64 `locationName:"layerSize" type:"long"`
  1430. }
  1431. // String returns the string representation
  1432. func (s Layer) String() string {
  1433. return awsutil.Prettify(s)
  1434. }
  1435. // GoString returns the string representation
  1436. func (s Layer) GoString() string {
  1437. return s.String()
  1438. }
  1439. // An object representing an Amazon ECR image layer failure.
  1440. type LayerFailure struct {
  1441. _ struct{} `type:"structure"`
  1442. // The failure code associated with the failure.
  1443. FailureCode *string `locationName:"failureCode" type:"string" enum:"LayerFailureCode"`
  1444. // The reason for the failure.
  1445. FailureReason *string `locationName:"failureReason" type:"string"`
  1446. // The layer digest associated with the failure.
  1447. LayerDigest *string `locationName:"layerDigest" type:"string"`
  1448. }
  1449. // String returns the string representation
  1450. func (s LayerFailure) String() string {
  1451. return awsutil.Prettify(s)
  1452. }
  1453. // GoString returns the string representation
  1454. func (s LayerFailure) GoString() string {
  1455. return s.String()
  1456. }
  1457. type ListImagesFilter struct {
  1458. _ struct{} `type:"structure"`
  1459. TagStatus *string `locationName:"tagStatus" type:"string" enum:"TagStatus"`
  1460. }
  1461. // String returns the string representation
  1462. func (s ListImagesFilter) String() string {
  1463. return awsutil.Prettify(s)
  1464. }
  1465. // GoString returns the string representation
  1466. func (s ListImagesFilter) GoString() string {
  1467. return s.String()
  1468. }
  1469. type ListImagesInput struct {
  1470. _ struct{} `type:"structure"`
  1471. Filter *ListImagesFilter `locationName:"filter" type:"structure"`
  1472. // The maximum number of image results returned by ListImages in paginated output.
  1473. // When this parameter is used, ListImages only returns maxResults results in
  1474. // a single page along with a nextToken response element. The remaining results
  1475. // of the initial request can be seen by sending another ListImages request
  1476. // with the returned nextToken value. This value can be between 1 and 100. If
  1477. // this parameter is not used, then ListImages returns up to 100 results and
  1478. // a nextToken value, if applicable.
  1479. MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"`
  1480. // The nextToken value returned from a previous paginated ListImages request
  1481. // where maxResults was used and the results exceeded the value of that parameter.
  1482. // Pagination continues from the end of the previous results that returned the
  1483. // nextToken value. This value is null when there are no more results to return.
  1484. //
  1485. // This token should be treated as an opaque identifier that is only used
  1486. // to retrieve the next items in a list and not for other programmatic purposes.
  1487. NextToken *string `locationName:"nextToken" type:"string"`
  1488. // The AWS account ID associated with the registry that contains the repository
  1489. // to list images in. If you do not specify a registry, the default registry
  1490. // is assumed.
  1491. RegistryId *string `locationName:"registryId" type:"string"`
  1492. // The repository whose image IDs are to be listed.
  1493. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  1494. }
  1495. // String returns the string representation
  1496. func (s ListImagesInput) String() string {
  1497. return awsutil.Prettify(s)
  1498. }
  1499. // GoString returns the string representation
  1500. func (s ListImagesInput) GoString() string {
  1501. return s.String()
  1502. }
  1503. // Validate inspects the fields of the type to determine if they are valid.
  1504. func (s *ListImagesInput) Validate() error {
  1505. invalidParams := request.ErrInvalidParams{Context: "ListImagesInput"}
  1506. if s.MaxResults != nil && *s.MaxResults < 1 {
  1507. invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
  1508. }
  1509. if s.RepositoryName == nil {
  1510. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  1511. }
  1512. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  1513. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  1514. }
  1515. if invalidParams.Len() > 0 {
  1516. return invalidParams
  1517. }
  1518. return nil
  1519. }
  1520. type ListImagesOutput struct {
  1521. _ struct{} `type:"structure"`
  1522. // The list of image IDs for the requested repository.
  1523. ImageIds []*ImageIdentifier `locationName:"imageIds" min:"1" type:"list"`
  1524. // The nextToken value to include in a future ListImages request. When the results
  1525. // of a ListImages request exceed maxResults, this value can be used to retrieve
  1526. // the next page of results. This value is null when there are no more results
  1527. // to return.
  1528. NextToken *string `locationName:"nextToken" type:"string"`
  1529. }
  1530. // String returns the string representation
  1531. func (s ListImagesOutput) String() string {
  1532. return awsutil.Prettify(s)
  1533. }
  1534. // GoString returns the string representation
  1535. func (s ListImagesOutput) GoString() string {
  1536. return s.String()
  1537. }
  1538. type PutImageInput struct {
  1539. _ struct{} `type:"structure"`
  1540. // The image manifest corresponding to the image to be uploaded.
  1541. ImageManifest *string `locationName:"imageManifest" type:"string" required:"true"`
  1542. // The AWS account ID associated with the registry that contains the repository
  1543. // in which to put the image. If you do not specify a registry, the default
  1544. // registry is assumed.
  1545. RegistryId *string `locationName:"registryId" type:"string"`
  1546. // The name of the repository in which to put the image.
  1547. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  1548. }
  1549. // String returns the string representation
  1550. func (s PutImageInput) String() string {
  1551. return awsutil.Prettify(s)
  1552. }
  1553. // GoString returns the string representation
  1554. func (s PutImageInput) GoString() string {
  1555. return s.String()
  1556. }
  1557. // Validate inspects the fields of the type to determine if they are valid.
  1558. func (s *PutImageInput) Validate() error {
  1559. invalidParams := request.ErrInvalidParams{Context: "PutImageInput"}
  1560. if s.ImageManifest == nil {
  1561. invalidParams.Add(request.NewErrParamRequired("ImageManifest"))
  1562. }
  1563. if s.RepositoryName == nil {
  1564. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  1565. }
  1566. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  1567. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  1568. }
  1569. if invalidParams.Len() > 0 {
  1570. return invalidParams
  1571. }
  1572. return nil
  1573. }
  1574. type PutImageOutput struct {
  1575. _ struct{} `type:"structure"`
  1576. // Details of the image uploaded.
  1577. Image *Image `locationName:"image" type:"structure"`
  1578. }
  1579. // String returns the string representation
  1580. func (s PutImageOutput) String() string {
  1581. return awsutil.Prettify(s)
  1582. }
  1583. // GoString returns the string representation
  1584. func (s PutImageOutput) GoString() string {
  1585. return s.String()
  1586. }
  1587. // An object representing a repository.
  1588. type Repository struct {
  1589. _ struct{} `type:"structure"`
  1590. // The AWS account ID associated with the registry that contains the repository.
  1591. RegistryId *string `locationName:"registryId" type:"string"`
  1592. // The Amazon Resource Name (ARN) that identifies the repository. The ARN contains
  1593. // the arn:aws:ecr namespace, followed by the region of the repository, the
  1594. // AWS account ID of the repository owner, the repository namespace, and then
  1595. // the repository name. For example, arn:aws:ecr:region:012345678910:repository/test.
  1596. RepositoryArn *string `locationName:"repositoryArn" type:"string"`
  1597. // The name of the repository.
  1598. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"`
  1599. // The URI for the repository. You can use this URI for Docker push and pull
  1600. // operations.
  1601. RepositoryUri *string `locationName:"repositoryUri" type:"string"`
  1602. }
  1603. // String returns the string representation
  1604. func (s Repository) String() string {
  1605. return awsutil.Prettify(s)
  1606. }
  1607. // GoString returns the string representation
  1608. func (s Repository) GoString() string {
  1609. return s.String()
  1610. }
  1611. type SetRepositoryPolicyInput struct {
  1612. _ struct{} `type:"structure"`
  1613. // If the policy you are attempting to set on a repository policy would prevent
  1614. // you from setting another policy in the future, you must force the SetRepositoryPolicy
  1615. // operation. This is intended to prevent accidental repository lock outs.
  1616. Force *bool `locationName:"force" type:"boolean"`
  1617. // The JSON repository policy text to apply to the repository.
  1618. PolicyText *string `locationName:"policyText" type:"string" required:"true"`
  1619. // The AWS account ID associated with the registry that contains the repository.
  1620. // If you do not specify a registry, the default registry is assumed.
  1621. RegistryId *string `locationName:"registryId" type:"string"`
  1622. // The name of the repository to receive the policy.
  1623. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  1624. }
  1625. // String returns the string representation
  1626. func (s SetRepositoryPolicyInput) String() string {
  1627. return awsutil.Prettify(s)
  1628. }
  1629. // GoString returns the string representation
  1630. func (s SetRepositoryPolicyInput) GoString() string {
  1631. return s.String()
  1632. }
  1633. // Validate inspects the fields of the type to determine if they are valid.
  1634. func (s *SetRepositoryPolicyInput) Validate() error {
  1635. invalidParams := request.ErrInvalidParams{Context: "SetRepositoryPolicyInput"}
  1636. if s.PolicyText == nil {
  1637. invalidParams.Add(request.NewErrParamRequired("PolicyText"))
  1638. }
  1639. if s.RepositoryName == nil {
  1640. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  1641. }
  1642. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  1643. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  1644. }
  1645. if invalidParams.Len() > 0 {
  1646. return invalidParams
  1647. }
  1648. return nil
  1649. }
  1650. type SetRepositoryPolicyOutput struct {
  1651. _ struct{} `type:"structure"`
  1652. // The JSON repository policy text applied to the repository.
  1653. PolicyText *string `locationName:"policyText" type:"string"`
  1654. // The registry ID associated with the request.
  1655. RegistryId *string `locationName:"registryId" type:"string"`
  1656. // The repository name associated with the request.
  1657. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"`
  1658. }
  1659. // String returns the string representation
  1660. func (s SetRepositoryPolicyOutput) String() string {
  1661. return awsutil.Prettify(s)
  1662. }
  1663. // GoString returns the string representation
  1664. func (s SetRepositoryPolicyOutput) GoString() string {
  1665. return s.String()
  1666. }
  1667. type UploadLayerPartInput struct {
  1668. _ struct{} `type:"structure"`
  1669. // The base64-encoded layer part payload.
  1670. //
  1671. // LayerPartBlob is automatically base64 encoded/decoded by the SDK.
  1672. LayerPartBlob []byte `locationName:"layerPartBlob" type:"blob" required:"true"`
  1673. // The integer value of the first byte of the layer part.
  1674. PartFirstByte *int64 `locationName:"partFirstByte" type:"long" required:"true"`
  1675. // The integer value of the last byte of the layer part.
  1676. PartLastByte *int64 `locationName:"partLastByte" type:"long" required:"true"`
  1677. // The AWS account ID associated with the registry that you are uploading layer
  1678. // parts to. If you do not specify a registry, the default registry is assumed.
  1679. RegistryId *string `locationName:"registryId" type:"string"`
  1680. // The name of the repository that you are uploading layer parts to.
  1681. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
  1682. // The upload ID from a previous InitiateLayerUpload operation to associate
  1683. // with the layer part upload.
  1684. UploadId *string `locationName:"uploadId" type:"string" required:"true"`
  1685. }
  1686. // String returns the string representation
  1687. func (s UploadLayerPartInput) String() string {
  1688. return awsutil.Prettify(s)
  1689. }
  1690. // GoString returns the string representation
  1691. func (s UploadLayerPartInput) GoString() string {
  1692. return s.String()
  1693. }
  1694. // Validate inspects the fields of the type to determine if they are valid.
  1695. func (s *UploadLayerPartInput) Validate() error {
  1696. invalidParams := request.ErrInvalidParams{Context: "UploadLayerPartInput"}
  1697. if s.LayerPartBlob == nil {
  1698. invalidParams.Add(request.NewErrParamRequired("LayerPartBlob"))
  1699. }
  1700. if s.PartFirstByte == nil {
  1701. invalidParams.Add(request.NewErrParamRequired("PartFirstByte"))
  1702. }
  1703. if s.PartLastByte == nil {
  1704. invalidParams.Add(request.NewErrParamRequired("PartLastByte"))
  1705. }
  1706. if s.RepositoryName == nil {
  1707. invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
  1708. }
  1709. if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
  1710. invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
  1711. }
  1712. if s.UploadId == nil {
  1713. invalidParams.Add(request.NewErrParamRequired("UploadId"))
  1714. }
  1715. if invalidParams.Len() > 0 {
  1716. return invalidParams
  1717. }
  1718. return nil
  1719. }
  1720. type UploadLayerPartOutput struct {
  1721. _ struct{} `type:"structure"`
  1722. // The integer value of the last byte received in the request.
  1723. LastByteReceived *int64 `locationName:"lastByteReceived" type:"long"`
  1724. // The registry ID associated with the request.
  1725. RegistryId *string `locationName:"registryId" type:"string"`
  1726. // The repository name associated with the request.
  1727. RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"`
  1728. // The upload ID associated with the request.
  1729. UploadId *string `locationName:"uploadId" type:"string"`
  1730. }
  1731. // String returns the string representation
  1732. func (s UploadLayerPartOutput) String() string {
  1733. return awsutil.Prettify(s)
  1734. }
  1735. // GoString returns the string representation
  1736. func (s UploadLayerPartOutput) GoString() string {
  1737. return s.String()
  1738. }
  1739. const (
  1740. // @enum ImageFailureCode
  1741. ImageFailureCodeInvalidImageDigest = "InvalidImageDigest"
  1742. // @enum ImageFailureCode
  1743. ImageFailureCodeInvalidImageTag = "InvalidImageTag"
  1744. // @enum ImageFailureCode
  1745. ImageFailureCodeImageTagDoesNotMatchDigest = "ImageTagDoesNotMatchDigest"
  1746. // @enum ImageFailureCode
  1747. ImageFailureCodeImageNotFound = "ImageNotFound"
  1748. // @enum ImageFailureCode
  1749. ImageFailureCodeMissingDigestAndTag = "MissingDigestAndTag"
  1750. )
  1751. const (
  1752. // @enum LayerAvailability
  1753. LayerAvailabilityAvailable = "AVAILABLE"
  1754. // @enum LayerAvailability
  1755. LayerAvailabilityUnavailable = "UNAVAILABLE"
  1756. )
  1757. const (
  1758. // @enum LayerFailureCode
  1759. LayerFailureCodeInvalidLayerDigest = "InvalidLayerDigest"
  1760. // @enum LayerFailureCode
  1761. LayerFailureCodeMissingLayerDigest = "MissingLayerDigest"
  1762. )
  1763. const (
  1764. // @enum TagStatus
  1765. TagStatusTagged = "TAGGED"
  1766. // @enum TagStatus
  1767. TagStatusUntagged = "UNTAGGED"
  1768. )