1// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3package ecr 4 5import ( 6 "time" 7 8 "github.com/aws/aws-sdk-go/aws" 9 "github.com/aws/aws-sdk-go/aws/awsutil" 10 "github.com/aws/aws-sdk-go/aws/request" 11) 12 13const opBatchCheckLayerAvailability = "BatchCheckLayerAvailability" 14 15// BatchCheckLayerAvailabilityRequest generates a "aws/request.Request" representing the 16// client's request for the BatchCheckLayerAvailability operation. The "output" return 17// value will be populated with the request's response once the request complets 18// successfuly. 19// 20// Use "Send" method on the returned Request to send the API call to the service. 21// the "output" return value is not valid until after Send returns without error. 22// 23// See BatchCheckLayerAvailability for more information on using the BatchCheckLayerAvailability 24// API call, and error handling. 25// 26// This method is useful when you want to inject custom logic or configuration 27// into the SDK's request lifecycle. Such as custom headers, or retry logic. 28// 29// 30// // Example sending a request using the BatchCheckLayerAvailabilityRequest method. 31// req, resp := client.BatchCheckLayerAvailabilityRequest(params) 32// 33// err := req.Send() 34// if err == nil { // resp is now filled 35// fmt.Println(resp) 36// } 37// 38// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/BatchCheckLayerAvailability 39func (c *ECR) BatchCheckLayerAvailabilityRequest(input *BatchCheckLayerAvailabilityInput) (req *request.Request, output *BatchCheckLayerAvailabilityOutput) { 40 op := &request.Operation{ 41 Name: opBatchCheckLayerAvailability, 42 HTTPMethod: "POST", 43 HTTPPath: "/", 44 } 45 46 if input == nil { 47 input = &BatchCheckLayerAvailabilityInput{} 48 } 49 50 output = &BatchCheckLayerAvailabilityOutput{} 51 req = c.newRequest(op, input, output) 52 return 53} 54 55// BatchCheckLayerAvailability API operation for Amazon EC2 Container Registry. 56// 57// Check the availability of multiple image layers in a specified registry and 58// repository. 59// 60// This operation is used by the Amazon ECR proxy, and it is not intended for 61// general use by customers for pulling and pushing images. In most cases, you 62// should use the docker CLI to pull, tag, and push images. 63// 64// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 65// with awserr.Error's Code and Message methods to get detailed information about 66// the error. 67// 68// See the AWS API reference guide for Amazon EC2 Container Registry's 69// API operation BatchCheckLayerAvailability for usage and error information. 70// 71// Returned Error Codes: 72// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException" 73// The specified repository could not be found. Check the spelling of the specified 74// repository and ensure that you are performing operations on the correct registry. 75// 76// * ErrCodeInvalidParameterException "InvalidParameterException" 77// The specified parameter is invalid. Review the available parameters for the 78// API request. 79// 80// * ErrCodeServerException "ServerException" 81// These errors are usually caused by a server-side issue. 82// 83// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/BatchCheckLayerAvailability 84func (c *ECR) BatchCheckLayerAvailability(input *BatchCheckLayerAvailabilityInput) (*BatchCheckLayerAvailabilityOutput, error) { 85 req, out := c.BatchCheckLayerAvailabilityRequest(input) 86 return out, req.Send() 87} 88 89// BatchCheckLayerAvailabilityWithContext is the same as BatchCheckLayerAvailability with the addition of 90// the ability to pass a context and additional request options. 91// 92// See BatchCheckLayerAvailability for details on how to use this API operation. 93// 94// The context must be non-nil and will be used for request cancellation. If 95// the context is nil a panic will occur. In the future the SDK may create 96// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 97// for more information on using Contexts. 98func (c *ECR) BatchCheckLayerAvailabilityWithContext(ctx aws.Context, input *BatchCheckLayerAvailabilityInput, opts ...request.Option) (*BatchCheckLayerAvailabilityOutput, error) { 99 req, out := c.BatchCheckLayerAvailabilityRequest(input) 100 req.SetContext(ctx) 101 req.ApplyOptions(opts...) 102 return out, req.Send() 103} 104 105const opBatchDeleteImage = "BatchDeleteImage" 106 107// BatchDeleteImageRequest generates a "aws/request.Request" representing the 108// client's request for the BatchDeleteImage operation. The "output" return 109// value will be populated with the request's response once the request complets 110// successfuly. 111// 112// Use "Send" method on the returned Request to send the API call to the service. 113// the "output" return value is not valid until after Send returns without error. 114// 115// See BatchDeleteImage for more information on using the BatchDeleteImage 116// API call, and error handling. 117// 118// This method is useful when you want to inject custom logic or configuration 119// into the SDK's request lifecycle. Such as custom headers, or retry logic. 120// 121// 122// // Example sending a request using the BatchDeleteImageRequest method. 123// req, resp := client.BatchDeleteImageRequest(params) 124// 125// err := req.Send() 126// if err == nil { // resp is now filled 127// fmt.Println(resp) 128// } 129// 130// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/BatchDeleteImage 131func (c *ECR) BatchDeleteImageRequest(input *BatchDeleteImageInput) (req *request.Request, output *BatchDeleteImageOutput) { 132 op := &request.Operation{ 133 Name: opBatchDeleteImage, 134 HTTPMethod: "POST", 135 HTTPPath: "/", 136 } 137 138 if input == nil { 139 input = &BatchDeleteImageInput{} 140 } 141 142 output = &BatchDeleteImageOutput{} 143 req = c.newRequest(op, input, output) 144 return 145} 146 147// BatchDeleteImage API operation for Amazon EC2 Container Registry. 148// 149// Deletes a list of specified images within a specified repository. Images 150// are specified with either imageTag or imageDigest. 151// 152// You can remove a tag from an image by specifying the image's tag in your 153// request. When you remove the last tag from an image, the image is deleted 154// from your repository. 155// 156// You can completely delete an image (and all of its tags) by specifying the 157// image's digest in your request. 158// 159// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 160// with awserr.Error's Code and Message methods to get detailed information about 161// the error. 162// 163// See the AWS API reference guide for Amazon EC2 Container Registry's 164// API operation BatchDeleteImage for usage and error information. 165// 166// Returned Error Codes: 167// * ErrCodeServerException "ServerException" 168// These errors are usually caused by a server-side issue. 169// 170// * ErrCodeInvalidParameterException "InvalidParameterException" 171// The specified parameter is invalid. Review the available parameters for the 172// API request. 173// 174// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException" 175// The specified repository could not be found. Check the spelling of the specified 176// repository and ensure that you are performing operations on the correct registry. 177// 178// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/BatchDeleteImage 179func (c *ECR) BatchDeleteImage(input *BatchDeleteImageInput) (*BatchDeleteImageOutput, error) { 180 req, out := c.BatchDeleteImageRequest(input) 181 return out, req.Send() 182} 183 184// BatchDeleteImageWithContext is the same as BatchDeleteImage with the addition of 185// the ability to pass a context and additional request options. 186// 187// See BatchDeleteImage for details on how to use this API operation. 188// 189// The context must be non-nil and will be used for request cancellation. If 190// the context is nil a panic will occur. In the future the SDK may create 191// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 192// for more information on using Contexts. 193func (c *ECR) BatchDeleteImageWithContext(ctx aws.Context, input *BatchDeleteImageInput, opts ...request.Option) (*BatchDeleteImageOutput, error) { 194 req, out := c.BatchDeleteImageRequest(input) 195 req.SetContext(ctx) 196 req.ApplyOptions(opts...) 197 return out, req.Send() 198} 199 200const opBatchGetImage = "BatchGetImage" 201 202// BatchGetImageRequest generates a "aws/request.Request" representing the 203// client's request for the BatchGetImage operation. The "output" return 204// value will be populated with the request's response once the request complets 205// successfuly. 206// 207// Use "Send" method on the returned Request to send the API call to the service. 208// the "output" return value is not valid until after Send returns without error. 209// 210// See BatchGetImage for more information on using the BatchGetImage 211// API call, and error handling. 212// 213// This method is useful when you want to inject custom logic or configuration 214// into the SDK's request lifecycle. Such as custom headers, or retry logic. 215// 216// 217// // Example sending a request using the BatchGetImageRequest method. 218// req, resp := client.BatchGetImageRequest(params) 219// 220// err := req.Send() 221// if err == nil { // resp is now filled 222// fmt.Println(resp) 223// } 224// 225// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/BatchGetImage 226func (c *ECR) BatchGetImageRequest(input *BatchGetImageInput) (req *request.Request, output *BatchGetImageOutput) { 227 op := &request.Operation{ 228 Name: opBatchGetImage, 229 HTTPMethod: "POST", 230 HTTPPath: "/", 231 } 232 233 if input == nil { 234 input = &BatchGetImageInput{} 235 } 236 237 output = &BatchGetImageOutput{} 238 req = c.newRequest(op, input, output) 239 return 240} 241 242// BatchGetImage API operation for Amazon EC2 Container Registry. 243// 244// Gets detailed information for specified images within a specified repository. 245// Images are specified with either imageTag or imageDigest. 246// 247// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 248// with awserr.Error's Code and Message methods to get detailed information about 249// the error. 250// 251// See the AWS API reference guide for Amazon EC2 Container Registry's 252// API operation BatchGetImage for usage and error information. 253// 254// Returned Error Codes: 255// * ErrCodeServerException "ServerException" 256// These errors are usually caused by a server-side issue. 257// 258// * ErrCodeInvalidParameterException "InvalidParameterException" 259// The specified parameter is invalid. Review the available parameters for the 260// API request. 261// 262// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException" 263// The specified repository could not be found. Check the spelling of the specified 264// repository and ensure that you are performing operations on the correct registry. 265// 266// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/BatchGetImage 267func (c *ECR) BatchGetImage(input *BatchGetImageInput) (*BatchGetImageOutput, error) { 268 req, out := c.BatchGetImageRequest(input) 269 return out, req.Send() 270} 271 272// BatchGetImageWithContext is the same as BatchGetImage with the addition of 273// the ability to pass a context and additional request options. 274// 275// See BatchGetImage for details on how to use this API operation. 276// 277// The context must be non-nil and will be used for request cancellation. If 278// the context is nil a panic will occur. In the future the SDK may create 279// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 280// for more information on using Contexts. 281func (c *ECR) BatchGetImageWithContext(ctx aws.Context, input *BatchGetImageInput, opts ...request.Option) (*BatchGetImageOutput, error) { 282 req, out := c.BatchGetImageRequest(input) 283 req.SetContext(ctx) 284 req.ApplyOptions(opts...) 285 return out, req.Send() 286} 287 288const opCompleteLayerUpload = "CompleteLayerUpload" 289 290// CompleteLayerUploadRequest generates a "aws/request.Request" representing the 291// client's request for the CompleteLayerUpload operation. The "output" return 292// value will be populated with the request's response once the request complets 293// successfuly. 294// 295// Use "Send" method on the returned Request to send the API call to the service. 296// the "output" return value is not valid until after Send returns without error. 297// 298// See CompleteLayerUpload for more information on using the CompleteLayerUpload 299// API call, and error handling. 300// 301// This method is useful when you want to inject custom logic or configuration 302// into the SDK's request lifecycle. Such as custom headers, or retry logic. 303// 304// 305// // Example sending a request using the CompleteLayerUploadRequest method. 306// req, resp := client.CompleteLayerUploadRequest(params) 307// 308// err := req.Send() 309// if err == nil { // resp is now filled 310// fmt.Println(resp) 311// } 312// 313// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/CompleteLayerUpload 314func (c *ECR) CompleteLayerUploadRequest(input *CompleteLayerUploadInput) (req *request.Request, output *CompleteLayerUploadOutput) { 315 op := &request.Operation{ 316 Name: opCompleteLayerUpload, 317 HTTPMethod: "POST", 318 HTTPPath: "/", 319 } 320 321 if input == nil { 322 input = &CompleteLayerUploadInput{} 323 } 324 325 output = &CompleteLayerUploadOutput{} 326 req = c.newRequest(op, input, output) 327 return 328} 329 330// CompleteLayerUpload API operation for Amazon EC2 Container Registry. 331// 332// Inform Amazon ECR that the image layer upload for a specified registry, repository 333// name, and upload ID, has completed. You can optionally provide a sha256 digest 334// of the image layer for data validation purposes. 335// 336// This operation is used by the Amazon ECR proxy, and it is not intended for 337// general use by customers for pulling and pushing images. In most cases, you 338// should use the docker CLI to pull, tag, and push images. 339// 340// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 341// with awserr.Error's Code and Message methods to get detailed information about 342// the error. 343// 344// See the AWS API reference guide for Amazon EC2 Container Registry's 345// API operation CompleteLayerUpload for usage and error information. 346// 347// Returned Error Codes: 348// * ErrCodeServerException "ServerException" 349// These errors are usually caused by a server-side issue. 350// 351// * ErrCodeInvalidParameterException "InvalidParameterException" 352// The specified parameter is invalid. Review the available parameters for the 353// API request. 354// 355// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException" 356// The specified repository could not be found. Check the spelling of the specified 357// repository and ensure that you are performing operations on the correct registry. 358// 359// * ErrCodeUploadNotFoundException "UploadNotFoundException" 360// The upload could not be found, or the specified upload id is not valid for 361// this repository. 362// 363// * ErrCodeInvalidLayerException "InvalidLayerException" 364// The layer digest calculation performed by Amazon ECR upon receipt of the 365// image layer does not match the digest specified. 366// 367// * ErrCodeLayerPartTooSmallException "LayerPartTooSmallException" 368// Layer parts must be at least 5 MiB in size. 369// 370// * ErrCodeLayerAlreadyExistsException "LayerAlreadyExistsException" 371// The image layer already exists in the associated repository. 372// 373// * ErrCodeEmptyUploadException "EmptyUploadException" 374// The specified layer upload does not contain any layer parts. 375// 376// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/CompleteLayerUpload 377func (c *ECR) CompleteLayerUpload(input *CompleteLayerUploadInput) (*CompleteLayerUploadOutput, error) { 378 req, out := c.CompleteLayerUploadRequest(input) 379 return out, req.Send() 380} 381 382// CompleteLayerUploadWithContext is the same as CompleteLayerUpload with the addition of 383// the ability to pass a context and additional request options. 384// 385// See CompleteLayerUpload for details on how to use this API operation. 386// 387// The context must be non-nil and will be used for request cancellation. If 388// the context is nil a panic will occur. In the future the SDK may create 389// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 390// for more information on using Contexts. 391func (c *ECR) CompleteLayerUploadWithContext(ctx aws.Context, input *CompleteLayerUploadInput, opts ...request.Option) (*CompleteLayerUploadOutput, error) { 392 req, out := c.CompleteLayerUploadRequest(input) 393 req.SetContext(ctx) 394 req.ApplyOptions(opts...) 395 return out, req.Send() 396} 397 398const opCreateRepository = "CreateRepository" 399 400// CreateRepositoryRequest generates a "aws/request.Request" representing the 401// client's request for the CreateRepository operation. The "output" return 402// value will be populated with the request's response once the request complets 403// successfuly. 404// 405// Use "Send" method on the returned Request to send the API call to the service. 406// the "output" return value is not valid until after Send returns without error. 407// 408// See CreateRepository for more information on using the CreateRepository 409// API call, and error handling. 410// 411// This method is useful when you want to inject custom logic or configuration 412// into the SDK's request lifecycle. Such as custom headers, or retry logic. 413// 414// 415// // Example sending a request using the CreateRepositoryRequest method. 416// req, resp := client.CreateRepositoryRequest(params) 417// 418// err := req.Send() 419// if err == nil { // resp is now filled 420// fmt.Println(resp) 421// } 422// 423// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/CreateRepository 424func (c *ECR) CreateRepositoryRequest(input *CreateRepositoryInput) (req *request.Request, output *CreateRepositoryOutput) { 425 op := &request.Operation{ 426 Name: opCreateRepository, 427 HTTPMethod: "POST", 428 HTTPPath: "/", 429 } 430 431 if input == nil { 432 input = &CreateRepositoryInput{} 433 } 434 435 output = &CreateRepositoryOutput{} 436 req = c.newRequest(op, input, output) 437 return 438} 439 440// CreateRepository API operation for Amazon EC2 Container Registry. 441// 442// Creates an image repository. 443// 444// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 445// with awserr.Error's Code and Message methods to get detailed information about 446// the error. 447// 448// See the AWS API reference guide for Amazon EC2 Container Registry's 449// API operation CreateRepository for usage and error information. 450// 451// Returned Error Codes: 452// * ErrCodeServerException "ServerException" 453// These errors are usually caused by a server-side issue. 454// 455// * ErrCodeInvalidParameterException "InvalidParameterException" 456// The specified parameter is invalid. Review the available parameters for the 457// API request. 458// 459// * ErrCodeRepositoryAlreadyExistsException "RepositoryAlreadyExistsException" 460// The specified repository already exists in the specified registry. 461// 462// * ErrCodeLimitExceededException "LimitExceededException" 463// The operation did not succeed because it would have exceeded a service limit 464// for your account. For more information, see Amazon ECR Default Service Limits 465// (http://docs.aws.amazon.com/AmazonECR/latest/userguide/service_limits.html) 466// in the Amazon EC2 Container Registry User Guide. 467// 468// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/CreateRepository 469func (c *ECR) CreateRepository(input *CreateRepositoryInput) (*CreateRepositoryOutput, error) { 470 req, out := c.CreateRepositoryRequest(input) 471 return out, req.Send() 472} 473 474// CreateRepositoryWithContext is the same as CreateRepository with the addition of 475// the ability to pass a context and additional request options. 476// 477// See CreateRepository for details on how to use this API operation. 478// 479// The context must be non-nil and will be used for request cancellation. If 480// the context is nil a panic will occur. In the future the SDK may create 481// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 482// for more information on using Contexts. 483func (c *ECR) CreateRepositoryWithContext(ctx aws.Context, input *CreateRepositoryInput, opts ...request.Option) (*CreateRepositoryOutput, error) { 484 req, out := c.CreateRepositoryRequest(input) 485 req.SetContext(ctx) 486 req.ApplyOptions(opts...) 487 return out, req.Send() 488} 489 490const opDeleteRepository = "DeleteRepository" 491 492// DeleteRepositoryRequest generates a "aws/request.Request" representing the 493// client's request for the DeleteRepository operation. The "output" return 494// value will be populated with the request's response once the request complets 495// successfuly. 496// 497// Use "Send" method on the returned Request to send the API call to the service. 498// the "output" return value is not valid until after Send returns without error. 499// 500// See DeleteRepository for more information on using the DeleteRepository 501// API call, and error handling. 502// 503// This method is useful when you want to inject custom logic or configuration 504// into the SDK's request lifecycle. Such as custom headers, or retry logic. 505// 506// 507// // Example sending a request using the DeleteRepositoryRequest method. 508// req, resp := client.DeleteRepositoryRequest(params) 509// 510// err := req.Send() 511// if err == nil { // resp is now filled 512// fmt.Println(resp) 513// } 514// 515// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DeleteRepository 516func (c *ECR) DeleteRepositoryRequest(input *DeleteRepositoryInput) (req *request.Request, output *DeleteRepositoryOutput) { 517 op := &request.Operation{ 518 Name: opDeleteRepository, 519 HTTPMethod: "POST", 520 HTTPPath: "/", 521 } 522 523 if input == nil { 524 input = &DeleteRepositoryInput{} 525 } 526 527 output = &DeleteRepositoryOutput{} 528 req = c.newRequest(op, input, output) 529 return 530} 531 532// DeleteRepository API operation for Amazon EC2 Container Registry. 533// 534// Deletes an existing image repository. If a repository contains images, you 535// must use the force option to delete it. 536// 537// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 538// with awserr.Error's Code and Message methods to get detailed information about 539// the error. 540// 541// See the AWS API reference guide for Amazon EC2 Container Registry's 542// API operation DeleteRepository for usage and error information. 543// 544// Returned Error Codes: 545// * ErrCodeServerException "ServerException" 546// These errors are usually caused by a server-side issue. 547// 548// * ErrCodeInvalidParameterException "InvalidParameterException" 549// The specified parameter is invalid. Review the available parameters for the 550// API request. 551// 552// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException" 553// The specified repository could not be found. Check the spelling of the specified 554// repository and ensure that you are performing operations on the correct registry. 555// 556// * ErrCodeRepositoryNotEmptyException "RepositoryNotEmptyException" 557// The specified repository contains images. To delete a repository that contains 558// images, you must force the deletion with the force parameter. 559// 560// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DeleteRepository 561func (c *ECR) DeleteRepository(input *DeleteRepositoryInput) (*DeleteRepositoryOutput, error) { 562 req, out := c.DeleteRepositoryRequest(input) 563 return out, req.Send() 564} 565 566// DeleteRepositoryWithContext is the same as DeleteRepository with the addition of 567// the ability to pass a context and additional request options. 568// 569// See DeleteRepository for details on how to use this API operation. 570// 571// The context must be non-nil and will be used for request cancellation. If 572// the context is nil a panic will occur. In the future the SDK may create 573// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 574// for more information on using Contexts. 575func (c *ECR) DeleteRepositoryWithContext(ctx aws.Context, input *DeleteRepositoryInput, opts ...request.Option) (*DeleteRepositoryOutput, error) { 576 req, out := c.DeleteRepositoryRequest(input) 577 req.SetContext(ctx) 578 req.ApplyOptions(opts...) 579 return out, req.Send() 580} 581 582const opDeleteRepositoryPolicy = "DeleteRepositoryPolicy" 583 584// DeleteRepositoryPolicyRequest generates a "aws/request.Request" representing the 585// client's request for the DeleteRepositoryPolicy operation. The "output" return 586// value will be populated with the request's response once the request complets 587// successfuly. 588// 589// Use "Send" method on the returned Request to send the API call to the service. 590// the "output" return value is not valid until after Send returns without error. 591// 592// See DeleteRepositoryPolicy for more information on using the DeleteRepositoryPolicy 593// API call, and error handling. 594// 595// This method is useful when you want to inject custom logic or configuration 596// into the SDK's request lifecycle. Such as custom headers, or retry logic. 597// 598// 599// // Example sending a request using the DeleteRepositoryPolicyRequest method. 600// req, resp := client.DeleteRepositoryPolicyRequest(params) 601// 602// err := req.Send() 603// if err == nil { // resp is now filled 604// fmt.Println(resp) 605// } 606// 607// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DeleteRepositoryPolicy 608func (c *ECR) DeleteRepositoryPolicyRequest(input *DeleteRepositoryPolicyInput) (req *request.Request, output *DeleteRepositoryPolicyOutput) { 609 op := &request.Operation{ 610 Name: opDeleteRepositoryPolicy, 611 HTTPMethod: "POST", 612 HTTPPath: "/", 613 } 614 615 if input == nil { 616 input = &DeleteRepositoryPolicyInput{} 617 } 618 619 output = &DeleteRepositoryPolicyOutput{} 620 req = c.newRequest(op, input, output) 621 return 622} 623 624// DeleteRepositoryPolicy API operation for Amazon EC2 Container Registry. 625// 626// Deletes the repository policy from a specified repository. 627// 628// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 629// with awserr.Error's Code and Message methods to get detailed information about 630// the error. 631// 632// See the AWS API reference guide for Amazon EC2 Container Registry's 633// API operation DeleteRepositoryPolicy for usage and error information. 634// 635// Returned Error Codes: 636// * ErrCodeServerException "ServerException" 637// These errors are usually caused by a server-side issue. 638// 639// * ErrCodeInvalidParameterException "InvalidParameterException" 640// The specified parameter is invalid. Review the available parameters for the 641// API request. 642// 643// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException" 644// The specified repository could not be found. Check the spelling of the specified 645// repository and ensure that you are performing operations on the correct registry. 646// 647// * ErrCodeRepositoryPolicyNotFoundException "RepositoryPolicyNotFoundException" 648// The specified repository and registry combination does not have an associated 649// repository policy. 650// 651// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DeleteRepositoryPolicy 652func (c *ECR) DeleteRepositoryPolicy(input *DeleteRepositoryPolicyInput) (*DeleteRepositoryPolicyOutput, error) { 653 req, out := c.DeleteRepositoryPolicyRequest(input) 654 return out, req.Send() 655} 656 657// DeleteRepositoryPolicyWithContext is the same as DeleteRepositoryPolicy with the addition of 658// the ability to pass a context and additional request options. 659// 660// See DeleteRepositoryPolicy for details on how to use this API operation. 661// 662// The context must be non-nil and will be used for request cancellation. If 663// the context is nil a panic will occur. In the future the SDK may create 664// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 665// for more information on using Contexts. 666func (c *ECR) DeleteRepositoryPolicyWithContext(ctx aws.Context, input *DeleteRepositoryPolicyInput, opts ...request.Option) (*DeleteRepositoryPolicyOutput, error) { 667 req, out := c.DeleteRepositoryPolicyRequest(input) 668 req.SetContext(ctx) 669 req.ApplyOptions(opts...) 670 return out, req.Send() 671} 672 673const opDescribeImages = "DescribeImages" 674 675// DescribeImagesRequest generates a "aws/request.Request" representing the 676// client's request for the DescribeImages operation. The "output" return 677// value will be populated with the request's response once the request complets 678// successfuly. 679// 680// Use "Send" method on the returned Request to send the API call to the service. 681// the "output" return value is not valid until after Send returns without error. 682// 683// See DescribeImages for more information on using the DescribeImages 684// API call, and error handling. 685// 686// This method is useful when you want to inject custom logic or configuration 687// into the SDK's request lifecycle. Such as custom headers, or retry logic. 688// 689// 690// // Example sending a request using the DescribeImagesRequest method. 691// req, resp := client.DescribeImagesRequest(params) 692// 693// err := req.Send() 694// if err == nil { // resp is now filled 695// fmt.Println(resp) 696// } 697// 698// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DescribeImages 699func (c *ECR) DescribeImagesRequest(input *DescribeImagesInput) (req *request.Request, output *DescribeImagesOutput) { 700 op := &request.Operation{ 701 Name: opDescribeImages, 702 HTTPMethod: "POST", 703 HTTPPath: "/", 704 Paginator: &request.Paginator{ 705 InputTokens: []string{"nextToken"}, 706 OutputTokens: []string{"nextToken"}, 707 LimitToken: "maxResults", 708 TruncationToken: "", 709 }, 710 } 711 712 if input == nil { 713 input = &DescribeImagesInput{} 714 } 715 716 output = &DescribeImagesOutput{} 717 req = c.newRequest(op, input, output) 718 return 719} 720 721// DescribeImages API operation for Amazon EC2 Container Registry. 722// 723// Returns metadata about the images in a repository, including image size, 724// image tags, and creation date. 725// 726// Beginning with Docker version 1.9, the Docker client compresses image layers 727// before pushing them to a V2 Docker registry. The output of the docker images 728// command shows the uncompressed image size, so it may return a larger image 729// size than the image sizes returned by DescribeImages. 730// 731// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 732// with awserr.Error's Code and Message methods to get detailed information about 733// the error. 734// 735// See the AWS API reference guide for Amazon EC2 Container Registry's 736// API operation DescribeImages for usage and error information. 737// 738// Returned Error Codes: 739// * ErrCodeServerException "ServerException" 740// These errors are usually caused by a server-side issue. 741// 742// * ErrCodeInvalidParameterException "InvalidParameterException" 743// The specified parameter is invalid. Review the available parameters for the 744// API request. 745// 746// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException" 747// The specified repository could not be found. Check the spelling of the specified 748// repository and ensure that you are performing operations on the correct registry. 749// 750// * ErrCodeImageNotFoundException "ImageNotFoundException" 751// The image requested does not exist in the specified repository. 752// 753// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DescribeImages 754func (c *ECR) DescribeImages(input *DescribeImagesInput) (*DescribeImagesOutput, error) { 755 req, out := c.DescribeImagesRequest(input) 756 return out, req.Send() 757} 758 759// DescribeImagesWithContext is the same as DescribeImages with the addition of 760// the ability to pass a context and additional request options. 761// 762// See DescribeImages for details on how to use this API operation. 763// 764// The context must be non-nil and will be used for request cancellation. If 765// the context is nil a panic will occur. In the future the SDK may create 766// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 767// for more information on using Contexts. 768func (c *ECR) DescribeImagesWithContext(ctx aws.Context, input *DescribeImagesInput, opts ...request.Option) (*DescribeImagesOutput, error) { 769 req, out := c.DescribeImagesRequest(input) 770 req.SetContext(ctx) 771 req.ApplyOptions(opts...) 772 return out, req.Send() 773} 774 775// DescribeImagesPages iterates over the pages of a DescribeImages operation, 776// calling the "fn" function with the response data for each page. To stop 777// iterating, return false from the fn function. 778// 779// See DescribeImages method for more information on how to use this operation. 780// 781// Note: This operation can generate multiple requests to a service. 782// 783// // Example iterating over at most 3 pages of a DescribeImages operation. 784// pageNum := 0 785// err := client.DescribeImagesPages(params, 786// func(page *DescribeImagesOutput, lastPage bool) bool { 787// pageNum++ 788// fmt.Println(page) 789// return pageNum <= 3 790// }) 791// 792func (c *ECR) DescribeImagesPages(input *DescribeImagesInput, fn func(*DescribeImagesOutput, bool) bool) error { 793 return c.DescribeImagesPagesWithContext(aws.BackgroundContext(), input, fn) 794} 795 796// DescribeImagesPagesWithContext same as DescribeImagesPages except 797// it takes a Context and allows setting request options on the pages. 798// 799// The context must be non-nil and will be used for request cancellation. If 800// the context is nil a panic will occur. In the future the SDK may create 801// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 802// for more information on using Contexts. 803func (c *ECR) DescribeImagesPagesWithContext(ctx aws.Context, input *DescribeImagesInput, fn func(*DescribeImagesOutput, bool) bool, opts ...request.Option) error { 804 p := request.Pagination{ 805 NewRequest: func() (*request.Request, error) { 806 var inCpy *DescribeImagesInput 807 if input != nil { 808 tmp := *input 809 inCpy = &tmp 810 } 811 req, _ := c.DescribeImagesRequest(inCpy) 812 req.SetContext(ctx) 813 req.ApplyOptions(opts...) 814 return req, nil 815 }, 816 } 817 818 cont := true 819 for p.Next() && cont { 820 cont = fn(p.Page().(*DescribeImagesOutput), !p.HasNextPage()) 821 } 822 return p.Err() 823} 824 825const opDescribeRepositories = "DescribeRepositories" 826 827// DescribeRepositoriesRequest generates a "aws/request.Request" representing the 828// client's request for the DescribeRepositories operation. The "output" return 829// value will be populated with the request's response once the request complets 830// successfuly. 831// 832// Use "Send" method on the returned Request to send the API call to the service. 833// the "output" return value is not valid until after Send returns without error. 834// 835// See DescribeRepositories for more information on using the DescribeRepositories 836// API call, and error handling. 837// 838// This method is useful when you want to inject custom logic or configuration 839// into the SDK's request lifecycle. Such as custom headers, or retry logic. 840// 841// 842// // Example sending a request using the DescribeRepositoriesRequest method. 843// req, resp := client.DescribeRepositoriesRequest(params) 844// 845// err := req.Send() 846// if err == nil { // resp is now filled 847// fmt.Println(resp) 848// } 849// 850// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DescribeRepositories 851func (c *ECR) DescribeRepositoriesRequest(input *DescribeRepositoriesInput) (req *request.Request, output *DescribeRepositoriesOutput) { 852 op := &request.Operation{ 853 Name: opDescribeRepositories, 854 HTTPMethod: "POST", 855 HTTPPath: "/", 856 Paginator: &request.Paginator{ 857 InputTokens: []string{"nextToken"}, 858 OutputTokens: []string{"nextToken"}, 859 LimitToken: "maxResults", 860 TruncationToken: "", 861 }, 862 } 863 864 if input == nil { 865 input = &DescribeRepositoriesInput{} 866 } 867 868 output = &DescribeRepositoriesOutput{} 869 req = c.newRequest(op, input, output) 870 return 871} 872 873// DescribeRepositories API operation for Amazon EC2 Container Registry. 874// 875// Describes image repositories in a registry. 876// 877// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 878// with awserr.Error's Code and Message methods to get detailed information about 879// the error. 880// 881// See the AWS API reference guide for Amazon EC2 Container Registry's 882// API operation DescribeRepositories for usage and error information. 883// 884// Returned Error Codes: 885// * ErrCodeServerException "ServerException" 886// These errors are usually caused by a server-side issue. 887// 888// * ErrCodeInvalidParameterException "InvalidParameterException" 889// The specified parameter is invalid. Review the available parameters for the 890// API request. 891// 892// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException" 893// The specified repository could not be found. Check the spelling of the specified 894// repository and ensure that you are performing operations on the correct registry. 895// 896// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DescribeRepositories 897func (c *ECR) DescribeRepositories(input *DescribeRepositoriesInput) (*DescribeRepositoriesOutput, error) { 898 req, out := c.DescribeRepositoriesRequest(input) 899 return out, req.Send() 900} 901 902// DescribeRepositoriesWithContext is the same as DescribeRepositories with the addition of 903// the ability to pass a context and additional request options. 904// 905// See DescribeRepositories for details on how to use this API operation. 906// 907// The context must be non-nil and will be used for request cancellation. If 908// the context is nil a panic will occur. In the future the SDK may create 909// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 910// for more information on using Contexts. 911func (c *ECR) DescribeRepositoriesWithContext(ctx aws.Context, input *DescribeRepositoriesInput, opts ...request.Option) (*DescribeRepositoriesOutput, error) { 912 req, out := c.DescribeRepositoriesRequest(input) 913 req.SetContext(ctx) 914 req.ApplyOptions(opts...) 915 return out, req.Send() 916} 917 918// DescribeRepositoriesPages iterates over the pages of a DescribeRepositories operation, 919// calling the "fn" function with the response data for each page. To stop 920// iterating, return false from the fn function. 921// 922// See DescribeRepositories method for more information on how to use this operation. 923// 924// Note: This operation can generate multiple requests to a service. 925// 926// // Example iterating over at most 3 pages of a DescribeRepositories operation. 927// pageNum := 0 928// err := client.DescribeRepositoriesPages(params, 929// func(page *DescribeRepositoriesOutput, lastPage bool) bool { 930// pageNum++ 931// fmt.Println(page) 932// return pageNum <= 3 933// }) 934// 935func (c *ECR) DescribeRepositoriesPages(input *DescribeRepositoriesInput, fn func(*DescribeRepositoriesOutput, bool) bool) error { 936 return c.DescribeRepositoriesPagesWithContext(aws.BackgroundContext(), input, fn) 937} 938 939// DescribeRepositoriesPagesWithContext same as DescribeRepositoriesPages except 940// it takes a Context and allows setting request options on the pages. 941// 942// The context must be non-nil and will be used for request cancellation. If 943// the context is nil a panic will occur. In the future the SDK may create 944// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 945// for more information on using Contexts. 946func (c *ECR) DescribeRepositoriesPagesWithContext(ctx aws.Context, input *DescribeRepositoriesInput, fn func(*DescribeRepositoriesOutput, bool) bool, opts ...request.Option) error { 947 p := request.Pagination{ 948 NewRequest: func() (*request.Request, error) { 949 var inCpy *DescribeRepositoriesInput 950 if input != nil { 951 tmp := *input 952 inCpy = &tmp 953 } 954 req, _ := c.DescribeRepositoriesRequest(inCpy) 955 req.SetContext(ctx) 956 req.ApplyOptions(opts...) 957 return req, nil 958 }, 959 } 960 961 cont := true 962 for p.Next() && cont { 963 cont = fn(p.Page().(*DescribeRepositoriesOutput), !p.HasNextPage()) 964 } 965 return p.Err() 966} 967 968const opGetAuthorizationToken = "GetAuthorizationToken" 969 970// GetAuthorizationTokenRequest generates a "aws/request.Request" representing the 971// client's request for the GetAuthorizationToken operation. The "output" return 972// value will be populated with the request's response once the request complets 973// successfuly. 974// 975// Use "Send" method on the returned Request to send the API call to the service. 976// the "output" return value is not valid until after Send returns without error. 977// 978// See GetAuthorizationToken for more information on using the GetAuthorizationToken 979// API call, and error handling. 980// 981// This method is useful when you want to inject custom logic or configuration 982// into the SDK's request lifecycle. Such as custom headers, or retry logic. 983// 984// 985// // Example sending a request using the GetAuthorizationTokenRequest method. 986// req, resp := client.GetAuthorizationTokenRequest(params) 987// 988// err := req.Send() 989// if err == nil { // resp is now filled 990// fmt.Println(resp) 991// } 992// 993// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetAuthorizationToken 994func (c *ECR) GetAuthorizationTokenRequest(input *GetAuthorizationTokenInput) (req *request.Request, output *GetAuthorizationTokenOutput) { 995 op := &request.Operation{ 996 Name: opGetAuthorizationToken, 997 HTTPMethod: "POST", 998 HTTPPath: "/", 999 } 1000 1001 if input == nil { 1002 input = &GetAuthorizationTokenInput{} 1003 } 1004 1005 output = &GetAuthorizationTokenOutput{} 1006 req = c.newRequest(op, input, output) 1007 return 1008} 1009 1010// GetAuthorizationToken API operation for Amazon EC2 Container Registry. 1011// 1012// Retrieves a token that is valid for a specified registry for 12 hours. This 1013// command allows you to use the docker CLI to push and pull images with Amazon 1014// ECR. If you do not specify a registry, the default registry is assumed. 1015// 1016// The authorizationToken returned for each registry specified is a base64 encoded 1017// string that can be decoded and used in a docker login command to authenticate 1018// to a registry. The AWS CLI offers an aws ecr get-login command that simplifies 1019// the login process. 1020// 1021// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1022// with awserr.Error's Code and Message methods to get detailed information about 1023// the error. 1024// 1025// See the AWS API reference guide for Amazon EC2 Container Registry's 1026// API operation GetAuthorizationToken for usage and error information. 1027// 1028// Returned Error Codes: 1029// * ErrCodeServerException "ServerException" 1030// These errors are usually caused by a server-side issue. 1031// 1032// * ErrCodeInvalidParameterException "InvalidParameterException" 1033// The specified parameter is invalid. Review the available parameters for the 1034// API request. 1035// 1036// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetAuthorizationToken 1037func (c *ECR) GetAuthorizationToken(input *GetAuthorizationTokenInput) (*GetAuthorizationTokenOutput, error) { 1038 req, out := c.GetAuthorizationTokenRequest(input) 1039 return out, req.Send() 1040} 1041 1042// GetAuthorizationTokenWithContext is the same as GetAuthorizationToken with the addition of 1043// the ability to pass a context and additional request options. 1044// 1045// See GetAuthorizationToken for details on how to use this API operation. 1046// 1047// The context must be non-nil and will be used for request cancellation. If 1048// the context is nil a panic will occur. In the future the SDK may create 1049// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1050// for more information on using Contexts. 1051func (c *ECR) GetAuthorizationTokenWithContext(ctx aws.Context, input *GetAuthorizationTokenInput, opts ...request.Option) (*GetAuthorizationTokenOutput, error) { 1052 req, out := c.GetAuthorizationTokenRequest(input) 1053 req.SetContext(ctx) 1054 req.ApplyOptions(opts...) 1055 return out, req.Send() 1056} 1057 1058const opGetDownloadUrlForLayer = "GetDownloadUrlForLayer" 1059 1060// GetDownloadUrlForLayerRequest generates a "aws/request.Request" representing the 1061// client's request for the GetDownloadUrlForLayer operation. The "output" return 1062// value will be populated with the request's response once the request complets 1063// successfuly. 1064// 1065// Use "Send" method on the returned Request to send the API call to the service. 1066// the "output" return value is not valid until after Send returns without error. 1067// 1068// See GetDownloadUrlForLayer for more information on using the GetDownloadUrlForLayer 1069// API call, and error handling. 1070// 1071// This method is useful when you want to inject custom logic or configuration 1072// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1073// 1074// 1075// // Example sending a request using the GetDownloadUrlForLayerRequest method. 1076// req, resp := client.GetDownloadUrlForLayerRequest(params) 1077// 1078// err := req.Send() 1079// if err == nil { // resp is now filled 1080// fmt.Println(resp) 1081// } 1082// 1083// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetDownloadUrlForLayer 1084func (c *ECR) GetDownloadUrlForLayerRequest(input *GetDownloadUrlForLayerInput) (req *request.Request, output *GetDownloadUrlForLayerOutput) { 1085 op := &request.Operation{ 1086 Name: opGetDownloadUrlForLayer, 1087 HTTPMethod: "POST", 1088 HTTPPath: "/", 1089 } 1090 1091 if input == nil { 1092 input = &GetDownloadUrlForLayerInput{} 1093 } 1094 1095 output = &GetDownloadUrlForLayerOutput{} 1096 req = c.newRequest(op, input, output) 1097 return 1098} 1099 1100// GetDownloadUrlForLayer API operation for Amazon EC2 Container Registry. 1101// 1102// Retrieves the pre-signed Amazon S3 download URL corresponding to an image 1103// layer. You can only get URLs for image layers that are referenced in an image. 1104// 1105// This operation is used by the Amazon ECR proxy, and it is not intended for 1106// general use by customers for pulling and pushing images. In most cases, you 1107// should use the docker CLI to pull, tag, and push images. 1108// 1109// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1110// with awserr.Error's Code and Message methods to get detailed information about 1111// the error. 1112// 1113// See the AWS API reference guide for Amazon EC2 Container Registry's 1114// API operation GetDownloadUrlForLayer for usage and error information. 1115// 1116// Returned Error Codes: 1117// * ErrCodeServerException "ServerException" 1118// These errors are usually caused by a server-side issue. 1119// 1120// * ErrCodeInvalidParameterException "InvalidParameterException" 1121// The specified parameter is invalid. Review the available parameters for the 1122// API request. 1123// 1124// * ErrCodeLayersNotFoundException "LayersNotFoundException" 1125// The specified layers could not be found, or the specified layer is not valid 1126// for this repository. 1127// 1128// * ErrCodeLayerInaccessibleException "LayerInaccessibleException" 1129// The specified layer is not available because it is not associated with an 1130// image. Unassociated image layers may be cleaned up at any time. 1131// 1132// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException" 1133// The specified repository could not be found. Check the spelling of the specified 1134// repository and ensure that you are performing operations on the correct registry. 1135// 1136// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetDownloadUrlForLayer 1137func (c *ECR) GetDownloadUrlForLayer(input *GetDownloadUrlForLayerInput) (*GetDownloadUrlForLayerOutput, error) { 1138 req, out := c.GetDownloadUrlForLayerRequest(input) 1139 return out, req.Send() 1140} 1141 1142// GetDownloadUrlForLayerWithContext is the same as GetDownloadUrlForLayer with the addition of 1143// the ability to pass a context and additional request options. 1144// 1145// See GetDownloadUrlForLayer for details on how to use this API operation. 1146// 1147// The context must be non-nil and will be used for request cancellation. If 1148// the context is nil a panic will occur. In the future the SDK may create 1149// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1150// for more information on using Contexts. 1151func (c *ECR) GetDownloadUrlForLayerWithContext(ctx aws.Context, input *GetDownloadUrlForLayerInput, opts ...request.Option) (*GetDownloadUrlForLayerOutput, error) { 1152 req, out := c.GetDownloadUrlForLayerRequest(input) 1153 req.SetContext(ctx) 1154 req.ApplyOptions(opts...) 1155 return out, req.Send() 1156} 1157 1158const opGetRepositoryPolicy = "GetRepositoryPolicy" 1159 1160// GetRepositoryPolicyRequest generates a "aws/request.Request" representing the 1161// client's request for the GetRepositoryPolicy operation. The "output" return 1162// value will be populated with the request's response once the request complets 1163// successfuly. 1164// 1165// Use "Send" method on the returned Request to send the API call to the service. 1166// the "output" return value is not valid until after Send returns without error. 1167// 1168// See GetRepositoryPolicy for more information on using the GetRepositoryPolicy 1169// API call, and error handling. 1170// 1171// This method is useful when you want to inject custom logic or configuration 1172// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1173// 1174// 1175// // Example sending a request using the GetRepositoryPolicyRequest method. 1176// req, resp := client.GetRepositoryPolicyRequest(params) 1177// 1178// err := req.Send() 1179// if err == nil { // resp is now filled 1180// fmt.Println(resp) 1181// } 1182// 1183// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetRepositoryPolicy 1184func (c *ECR) GetRepositoryPolicyRequest(input *GetRepositoryPolicyInput) (req *request.Request, output *GetRepositoryPolicyOutput) { 1185 op := &request.Operation{ 1186 Name: opGetRepositoryPolicy, 1187 HTTPMethod: "POST", 1188 HTTPPath: "/", 1189 } 1190 1191 if input == nil { 1192 input = &GetRepositoryPolicyInput{} 1193 } 1194 1195 output = &GetRepositoryPolicyOutput{} 1196 req = c.newRequest(op, input, output) 1197 return 1198} 1199 1200// GetRepositoryPolicy API operation for Amazon EC2 Container Registry. 1201// 1202// Retrieves the repository policy for a specified repository. 1203// 1204// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1205// with awserr.Error's Code and Message methods to get detailed information about 1206// the error. 1207// 1208// See the AWS API reference guide for Amazon EC2 Container Registry's 1209// API operation GetRepositoryPolicy for usage and error information. 1210// 1211// Returned Error Codes: 1212// * ErrCodeServerException "ServerException" 1213// These errors are usually caused by a server-side issue. 1214// 1215// * ErrCodeInvalidParameterException "InvalidParameterException" 1216// The specified parameter is invalid. Review the available parameters for the 1217// API request. 1218// 1219// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException" 1220// The specified repository could not be found. Check the spelling of the specified 1221// repository and ensure that you are performing operations on the correct registry. 1222// 1223// * ErrCodeRepositoryPolicyNotFoundException "RepositoryPolicyNotFoundException" 1224// The specified repository and registry combination does not have an associated 1225// repository policy. 1226// 1227// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetRepositoryPolicy 1228func (c *ECR) GetRepositoryPolicy(input *GetRepositoryPolicyInput) (*GetRepositoryPolicyOutput, error) { 1229 req, out := c.GetRepositoryPolicyRequest(input) 1230 return out, req.Send() 1231} 1232 1233// GetRepositoryPolicyWithContext is the same as GetRepositoryPolicy with the addition of 1234// the ability to pass a context and additional request options. 1235// 1236// See GetRepositoryPolicy for details on how to use this API operation. 1237// 1238// The context must be non-nil and will be used for request cancellation. If 1239// the context is nil a panic will occur. In the future the SDK may create 1240// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1241// for more information on using Contexts. 1242func (c *ECR) GetRepositoryPolicyWithContext(ctx aws.Context, input *GetRepositoryPolicyInput, opts ...request.Option) (*GetRepositoryPolicyOutput, error) { 1243 req, out := c.GetRepositoryPolicyRequest(input) 1244 req.SetContext(ctx) 1245 req.ApplyOptions(opts...) 1246 return out, req.Send() 1247} 1248 1249const opInitiateLayerUpload = "InitiateLayerUpload" 1250 1251// InitiateLayerUploadRequest generates a "aws/request.Request" representing the 1252// client's request for the InitiateLayerUpload operation. The "output" return 1253// value will be populated with the request's response once the request complets 1254// successfuly. 1255// 1256// Use "Send" method on the returned Request to send the API call to the service. 1257// the "output" return value is not valid until after Send returns without error. 1258// 1259// See InitiateLayerUpload for more information on using the InitiateLayerUpload 1260// API call, and error handling. 1261// 1262// This method is useful when you want to inject custom logic or configuration 1263// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1264// 1265// 1266// // Example sending a request using the InitiateLayerUploadRequest method. 1267// req, resp := client.InitiateLayerUploadRequest(params) 1268// 1269// err := req.Send() 1270// if err == nil { // resp is now filled 1271// fmt.Println(resp) 1272// } 1273// 1274// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/InitiateLayerUpload 1275func (c *ECR) InitiateLayerUploadRequest(input *InitiateLayerUploadInput) (req *request.Request, output *InitiateLayerUploadOutput) { 1276 op := &request.Operation{ 1277 Name: opInitiateLayerUpload, 1278 HTTPMethod: "POST", 1279 HTTPPath: "/", 1280 } 1281 1282 if input == nil { 1283 input = &InitiateLayerUploadInput{} 1284 } 1285 1286 output = &InitiateLayerUploadOutput{} 1287 req = c.newRequest(op, input, output) 1288 return 1289} 1290 1291// InitiateLayerUpload API operation for Amazon EC2 Container Registry. 1292// 1293// Notify Amazon ECR that you intend to upload an image layer. 1294// 1295// This operation is used by the Amazon ECR proxy, and it is not intended for 1296// general use by customers for pulling and pushing images. In most cases, you 1297// should use the docker CLI to pull, tag, and push images. 1298// 1299// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1300// with awserr.Error's Code and Message methods to get detailed information about 1301// the error. 1302// 1303// See the AWS API reference guide for Amazon EC2 Container Registry's 1304// API operation InitiateLayerUpload for usage and error information. 1305// 1306// Returned Error Codes: 1307// * ErrCodeServerException "ServerException" 1308// These errors are usually caused by a server-side issue. 1309// 1310// * ErrCodeInvalidParameterException "InvalidParameterException" 1311// The specified parameter is invalid. Review the available parameters for the 1312// API request. 1313// 1314// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException" 1315// The specified repository could not be found. Check the spelling of the specified 1316// repository and ensure that you are performing operations on the correct registry. 1317// 1318// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/InitiateLayerUpload 1319func (c *ECR) InitiateLayerUpload(input *InitiateLayerUploadInput) (*InitiateLayerUploadOutput, error) { 1320 req, out := c.InitiateLayerUploadRequest(input) 1321 return out, req.Send() 1322} 1323 1324// InitiateLayerUploadWithContext is the same as InitiateLayerUpload with the addition of 1325// the ability to pass a context and additional request options. 1326// 1327// See InitiateLayerUpload for details on how to use this API operation. 1328// 1329// The context must be non-nil and will be used for request cancellation. If 1330// the context is nil a panic will occur. In the future the SDK may create 1331// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1332// for more information on using Contexts. 1333func (c *ECR) InitiateLayerUploadWithContext(ctx aws.Context, input *InitiateLayerUploadInput, opts ...request.Option) (*InitiateLayerUploadOutput, error) { 1334 req, out := c.InitiateLayerUploadRequest(input) 1335 req.SetContext(ctx) 1336 req.ApplyOptions(opts...) 1337 return out, req.Send() 1338} 1339 1340const opListImages = "ListImages" 1341 1342// ListImagesRequest generates a "aws/request.Request" representing the 1343// client's request for the ListImages operation. The "output" return 1344// value will be populated with the request's response once the request complets 1345// successfuly. 1346// 1347// Use "Send" method on the returned Request to send the API call to the service. 1348// the "output" return value is not valid until after Send returns without error. 1349// 1350// See ListImages for more information on using the ListImages 1351// API call, and error handling. 1352// 1353// This method is useful when you want to inject custom logic or configuration 1354// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1355// 1356// 1357// // Example sending a request using the ListImagesRequest method. 1358// req, resp := client.ListImagesRequest(params) 1359// 1360// err := req.Send() 1361// if err == nil { // resp is now filled 1362// fmt.Println(resp) 1363// } 1364// 1365// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ListImages 1366func (c *ECR) ListImagesRequest(input *ListImagesInput) (req *request.Request, output *ListImagesOutput) { 1367 op := &request.Operation{ 1368 Name: opListImages, 1369 HTTPMethod: "POST", 1370 HTTPPath: "/", 1371 Paginator: &request.Paginator{ 1372 InputTokens: []string{"nextToken"}, 1373 OutputTokens: []string{"nextToken"}, 1374 LimitToken: "maxResults", 1375 TruncationToken: "", 1376 }, 1377 } 1378 1379 if input == nil { 1380 input = &ListImagesInput{} 1381 } 1382 1383 output = &ListImagesOutput{} 1384 req = c.newRequest(op, input, output) 1385 return 1386} 1387 1388// ListImages API operation for Amazon EC2 Container Registry. 1389// 1390// Lists all the image IDs for a given repository. 1391// 1392// You can filter images based on whether or not they are tagged by setting 1393// the tagStatus parameter to TAGGED or UNTAGGED. For example, you can filter 1394// your results to return only UNTAGGED images and then pipe that result to 1395// a BatchDeleteImage operation to delete them. Or, you can filter your results 1396// to return only TAGGED images to list all of the tags in your repository. 1397// 1398// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1399// with awserr.Error's Code and Message methods to get detailed information about 1400// the error. 1401// 1402// See the AWS API reference guide for Amazon EC2 Container Registry's 1403// API operation ListImages for usage and error information. 1404// 1405// Returned Error Codes: 1406// * ErrCodeServerException "ServerException" 1407// These errors are usually caused by a server-side issue. 1408// 1409// * ErrCodeInvalidParameterException "InvalidParameterException" 1410// The specified parameter is invalid. Review the available parameters for the 1411// API request. 1412// 1413// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException" 1414// The specified repository could not be found. Check the spelling of the specified 1415// repository and ensure that you are performing operations on the correct registry. 1416// 1417// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ListImages 1418func (c *ECR) ListImages(input *ListImagesInput) (*ListImagesOutput, error) { 1419 req, out := c.ListImagesRequest(input) 1420 return out, req.Send() 1421} 1422 1423// ListImagesWithContext is the same as ListImages with the addition of 1424// the ability to pass a context and additional request options. 1425// 1426// See ListImages for details on how to use this API operation. 1427// 1428// The context must be non-nil and will be used for request cancellation. If 1429// the context is nil a panic will occur. In the future the SDK may create 1430// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1431// for more information on using Contexts. 1432func (c *ECR) ListImagesWithContext(ctx aws.Context, input *ListImagesInput, opts ...request.Option) (*ListImagesOutput, error) { 1433 req, out := c.ListImagesRequest(input) 1434 req.SetContext(ctx) 1435 req.ApplyOptions(opts...) 1436 return out, req.Send() 1437} 1438 1439// ListImagesPages iterates over the pages of a ListImages operation, 1440// calling the "fn" function with the response data for each page. To stop 1441// iterating, return false from the fn function. 1442// 1443// See ListImages method for more information on how to use this operation. 1444// 1445// Note: This operation can generate multiple requests to a service. 1446// 1447// // Example iterating over at most 3 pages of a ListImages operation. 1448// pageNum := 0 1449// err := client.ListImagesPages(params, 1450// func(page *ListImagesOutput, lastPage bool) bool { 1451// pageNum++ 1452// fmt.Println(page) 1453// return pageNum <= 3 1454// }) 1455// 1456func (c *ECR) ListImagesPages(input *ListImagesInput, fn func(*ListImagesOutput, bool) bool) error { 1457 return c.ListImagesPagesWithContext(aws.BackgroundContext(), input, fn) 1458} 1459 1460// ListImagesPagesWithContext same as ListImagesPages except 1461// it takes a Context and allows setting request options on the pages. 1462// 1463// The context must be non-nil and will be used for request cancellation. If 1464// the context is nil a panic will occur. In the future the SDK may create 1465// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1466// for more information on using Contexts. 1467func (c *ECR) ListImagesPagesWithContext(ctx aws.Context, input *ListImagesInput, fn func(*ListImagesOutput, bool) bool, opts ...request.Option) error { 1468 p := request.Pagination{ 1469 NewRequest: func() (*request.Request, error) { 1470 var inCpy *ListImagesInput 1471 if input != nil { 1472 tmp := *input 1473 inCpy = &tmp 1474 } 1475 req, _ := c.ListImagesRequest(inCpy) 1476 req.SetContext(ctx) 1477 req.ApplyOptions(opts...) 1478 return req, nil 1479 }, 1480 } 1481 1482 cont := true 1483 for p.Next() && cont { 1484 cont = fn(p.Page().(*ListImagesOutput), !p.HasNextPage()) 1485 } 1486 return p.Err() 1487} 1488 1489const opPutImage = "PutImage" 1490 1491// PutImageRequest generates a "aws/request.Request" representing the 1492// client's request for the PutImage operation. The "output" return 1493// value will be populated with the request's response once the request complets 1494// successfuly. 1495// 1496// Use "Send" method on the returned Request to send the API call to the service. 1497// the "output" return value is not valid until after Send returns without error. 1498// 1499// See PutImage for more information on using the PutImage 1500// API call, and error handling. 1501// 1502// This method is useful when you want to inject custom logic or configuration 1503// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1504// 1505// 1506// // Example sending a request using the PutImageRequest method. 1507// req, resp := client.PutImageRequest(params) 1508// 1509// err := req.Send() 1510// if err == nil { // resp is now filled 1511// fmt.Println(resp) 1512// } 1513// 1514// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PutImage 1515func (c *ECR) PutImageRequest(input *PutImageInput) (req *request.Request, output *PutImageOutput) { 1516 op := &request.Operation{ 1517 Name: opPutImage, 1518 HTTPMethod: "POST", 1519 HTTPPath: "/", 1520 } 1521 1522 if input == nil { 1523 input = &PutImageInput{} 1524 } 1525 1526 output = &PutImageOutput{} 1527 req = c.newRequest(op, input, output) 1528 return 1529} 1530 1531// PutImage API operation for Amazon EC2 Container Registry. 1532// 1533// Creates or updates the image manifest and tags associated with an image. 1534// 1535// This operation is used by the Amazon ECR proxy, and it is not intended for 1536// general use by customers for pulling and pushing images. In most cases, you 1537// should use the docker CLI to pull, tag, and push images. 1538// 1539// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1540// with awserr.Error's Code and Message methods to get detailed information about 1541// the error. 1542// 1543// See the AWS API reference guide for Amazon EC2 Container Registry's 1544// API operation PutImage for usage and error information. 1545// 1546// Returned Error Codes: 1547// * ErrCodeServerException "ServerException" 1548// These errors are usually caused by a server-side issue. 1549// 1550// * ErrCodeInvalidParameterException "InvalidParameterException" 1551// The specified parameter is invalid. Review the available parameters for the 1552// API request. 1553// 1554// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException" 1555// The specified repository could not be found. Check the spelling of the specified 1556// repository and ensure that you are performing operations on the correct registry. 1557// 1558// * ErrCodeImageAlreadyExistsException "ImageAlreadyExistsException" 1559// The specified image has already been pushed, and there are no changes to 1560// the manifest or image tag since the last push. 1561// 1562// * ErrCodeLayersNotFoundException "LayersNotFoundException" 1563// The specified layers could not be found, or the specified layer is not valid 1564// for this repository. 1565// 1566// * ErrCodeLimitExceededException "LimitExceededException" 1567// The operation did not succeed because it would have exceeded a service limit 1568// for your account. For more information, see Amazon ECR Default Service Limits 1569// (http://docs.aws.amazon.com/AmazonECR/latest/userguide/service_limits.html) 1570// in the Amazon EC2 Container Registry User Guide. 1571// 1572// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PutImage 1573func (c *ECR) PutImage(input *PutImageInput) (*PutImageOutput, error) { 1574 req, out := c.PutImageRequest(input) 1575 return out, req.Send() 1576} 1577 1578// PutImageWithContext is the same as PutImage with the addition of 1579// the ability to pass a context and additional request options. 1580// 1581// See PutImage for details on how to use this API operation. 1582// 1583// The context must be non-nil and will be used for request cancellation. If 1584// the context is nil a panic will occur. In the future the SDK may create 1585// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1586// for more information on using Contexts. 1587func (c *ECR) PutImageWithContext(ctx aws.Context, input *PutImageInput, opts ...request.Option) (*PutImageOutput, error) { 1588 req, out := c.PutImageRequest(input) 1589 req.SetContext(ctx) 1590 req.ApplyOptions(opts...) 1591 return out, req.Send() 1592} 1593 1594const opSetRepositoryPolicy = "SetRepositoryPolicy" 1595 1596// SetRepositoryPolicyRequest generates a "aws/request.Request" representing the 1597// client's request for the SetRepositoryPolicy operation. The "output" return 1598// value will be populated with the request's response once the request complets 1599// successfuly. 1600// 1601// Use "Send" method on the returned Request to send the API call to the service. 1602// the "output" return value is not valid until after Send returns without error. 1603// 1604// See SetRepositoryPolicy for more information on using the SetRepositoryPolicy 1605// API call, and error handling. 1606// 1607// This method is useful when you want to inject custom logic or configuration 1608// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1609// 1610// 1611// // Example sending a request using the SetRepositoryPolicyRequest method. 1612// req, resp := client.SetRepositoryPolicyRequest(params) 1613// 1614// err := req.Send() 1615// if err == nil { // resp is now filled 1616// fmt.Println(resp) 1617// } 1618// 1619// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/SetRepositoryPolicy 1620func (c *ECR) SetRepositoryPolicyRequest(input *SetRepositoryPolicyInput) (req *request.Request, output *SetRepositoryPolicyOutput) { 1621 op := &request.Operation{ 1622 Name: opSetRepositoryPolicy, 1623 HTTPMethod: "POST", 1624 HTTPPath: "/", 1625 } 1626 1627 if input == nil { 1628 input = &SetRepositoryPolicyInput{} 1629 } 1630 1631 output = &SetRepositoryPolicyOutput{} 1632 req = c.newRequest(op, input, output) 1633 return 1634} 1635 1636// SetRepositoryPolicy API operation for Amazon EC2 Container Registry. 1637// 1638// Applies a repository policy on a specified repository to control access permissions. 1639// 1640// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1641// with awserr.Error's Code and Message methods to get detailed information about 1642// the error. 1643// 1644// See the AWS API reference guide for Amazon EC2 Container Registry's 1645// API operation SetRepositoryPolicy for usage and error information. 1646// 1647// Returned Error Codes: 1648// * ErrCodeServerException "ServerException" 1649// These errors are usually caused by a server-side issue. 1650// 1651// * ErrCodeInvalidParameterException "InvalidParameterException" 1652// The specified parameter is invalid. Review the available parameters for the 1653// API request. 1654// 1655// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException" 1656// The specified repository could not be found. Check the spelling of the specified 1657// repository and ensure that you are performing operations on the correct registry. 1658// 1659// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/SetRepositoryPolicy 1660func (c *ECR) SetRepositoryPolicy(input *SetRepositoryPolicyInput) (*SetRepositoryPolicyOutput, error) { 1661 req, out := c.SetRepositoryPolicyRequest(input) 1662 return out, req.Send() 1663} 1664 1665// SetRepositoryPolicyWithContext is the same as SetRepositoryPolicy with the addition of 1666// the ability to pass a context and additional request options. 1667// 1668// See SetRepositoryPolicy for details on how to use this API operation. 1669// 1670// The context must be non-nil and will be used for request cancellation. If 1671// the context is nil a panic will occur. In the future the SDK may create 1672// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1673// for more information on using Contexts. 1674func (c *ECR) SetRepositoryPolicyWithContext(ctx aws.Context, input *SetRepositoryPolicyInput, opts ...request.Option) (*SetRepositoryPolicyOutput, error) { 1675 req, out := c.SetRepositoryPolicyRequest(input) 1676 req.SetContext(ctx) 1677 req.ApplyOptions(opts...) 1678 return out, req.Send() 1679} 1680 1681const opUploadLayerPart = "UploadLayerPart" 1682 1683// UploadLayerPartRequest generates a "aws/request.Request" representing the 1684// client's request for the UploadLayerPart operation. The "output" return 1685// value will be populated with the request's response once the request complets 1686// successfuly. 1687// 1688// Use "Send" method on the returned Request to send the API call to the service. 1689// the "output" return value is not valid until after Send returns without error. 1690// 1691// See UploadLayerPart for more information on using the UploadLayerPart 1692// API call, and error handling. 1693// 1694// This method is useful when you want to inject custom logic or configuration 1695// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1696// 1697// 1698// // Example sending a request using the UploadLayerPartRequest method. 1699// req, resp := client.UploadLayerPartRequest(params) 1700// 1701// err := req.Send() 1702// if err == nil { // resp is now filled 1703// fmt.Println(resp) 1704// } 1705// 1706// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/UploadLayerPart 1707func (c *ECR) UploadLayerPartRequest(input *UploadLayerPartInput) (req *request.Request, output *UploadLayerPartOutput) { 1708 op := &request.Operation{ 1709 Name: opUploadLayerPart, 1710 HTTPMethod: "POST", 1711 HTTPPath: "/", 1712 } 1713 1714 if input == nil { 1715 input = &UploadLayerPartInput{} 1716 } 1717 1718 output = &UploadLayerPartOutput{} 1719 req = c.newRequest(op, input, output) 1720 return 1721} 1722 1723// UploadLayerPart API operation for Amazon EC2 Container Registry. 1724// 1725// Uploads an image layer part to Amazon ECR. 1726// 1727// This operation is used by the Amazon ECR proxy, and it is not intended for 1728// general use by customers for pulling and pushing images. In most cases, you 1729// should use the docker CLI to pull, tag, and push images. 1730// 1731// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1732// with awserr.Error's Code and Message methods to get detailed information about 1733// the error. 1734// 1735// See the AWS API reference guide for Amazon EC2 Container Registry's 1736// API operation UploadLayerPart for usage and error information. 1737// 1738// Returned Error Codes: 1739// * ErrCodeServerException "ServerException" 1740// These errors are usually caused by a server-side issue. 1741// 1742// * ErrCodeInvalidParameterException "InvalidParameterException" 1743// The specified parameter is invalid. Review the available parameters for the 1744// API request. 1745// 1746// * ErrCodeInvalidLayerPartException "InvalidLayerPartException" 1747// The layer part size is not valid, or the first byte specified is not consecutive 1748// to the last byte of a previous layer part upload. 1749// 1750// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException" 1751// The specified repository could not be found. Check the spelling of the specified 1752// repository and ensure that you are performing operations on the correct registry. 1753// 1754// * ErrCodeUploadNotFoundException "UploadNotFoundException" 1755// The upload could not be found, or the specified upload id is not valid for 1756// this repository. 1757// 1758// * ErrCodeLimitExceededException "LimitExceededException" 1759// The operation did not succeed because it would have exceeded a service limit 1760// for your account. For more information, see Amazon ECR Default Service Limits 1761// (http://docs.aws.amazon.com/AmazonECR/latest/userguide/service_limits.html) 1762// in the Amazon EC2 Container Registry User Guide. 1763// 1764// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/UploadLayerPart 1765func (c *ECR) UploadLayerPart(input *UploadLayerPartInput) (*UploadLayerPartOutput, error) { 1766 req, out := c.UploadLayerPartRequest(input) 1767 return out, req.Send() 1768} 1769 1770// UploadLayerPartWithContext is the same as UploadLayerPart with the addition of 1771// the ability to pass a context and additional request options. 1772// 1773// See UploadLayerPart for details on how to use this API operation. 1774// 1775// The context must be non-nil and will be used for request cancellation. If 1776// the context is nil a panic will occur. In the future the SDK may create 1777// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1778// for more information on using Contexts. 1779func (c *ECR) UploadLayerPartWithContext(ctx aws.Context, input *UploadLayerPartInput, opts ...request.Option) (*UploadLayerPartOutput, error) { 1780 req, out := c.UploadLayerPartRequest(input) 1781 req.SetContext(ctx) 1782 req.ApplyOptions(opts...) 1783 return out, req.Send() 1784} 1785 1786// An object representing authorization data for an Amazon ECR registry. 1787// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/AuthorizationData 1788type AuthorizationData struct { 1789 _ struct{} `type:"structure"` 1790 1791 // A base64-encoded string that contains authorization data for the specified 1792 // Amazon ECR registry. When the string is decoded, it is presented in the format 1793 // user:password for private registry authentication using docker login. 1794 AuthorizationToken *string `locationName:"authorizationToken" type:"string"` 1795 1796 // The Unix time in seconds and milliseconds when the authorization token expires. 1797 // Authorization tokens are valid for 12 hours. 1798 ExpiresAt *time.Time `locationName:"expiresAt" type:"timestamp" timestampFormat:"unix"` 1799 1800 // The registry URL to use for this authorization token in a docker login command. 1801 // The Amazon ECR registry URL format is https://aws_account_id.dkr.ecr.region.amazonaws.com. 1802 // For example, https://012345678910.dkr.ecr.us-east-1.amazonaws.com.. 1803 ProxyEndpoint *string `locationName:"proxyEndpoint" type:"string"` 1804} 1805 1806// String returns the string representation 1807func (s AuthorizationData) String() string { 1808 return awsutil.Prettify(s) 1809} 1810 1811// GoString returns the string representation 1812func (s AuthorizationData) GoString() string { 1813 return s.String() 1814} 1815 1816// SetAuthorizationToken sets the AuthorizationToken field's value. 1817func (s *AuthorizationData) SetAuthorizationToken(v string) *AuthorizationData { 1818 s.AuthorizationToken = &v 1819 return s 1820} 1821 1822// SetExpiresAt sets the ExpiresAt field's value. 1823func (s *AuthorizationData) SetExpiresAt(v time.Time) *AuthorizationData { 1824 s.ExpiresAt = &v 1825 return s 1826} 1827 1828// SetProxyEndpoint sets the ProxyEndpoint field's value. 1829func (s *AuthorizationData) SetProxyEndpoint(v string) *AuthorizationData { 1830 s.ProxyEndpoint = &v 1831 return s 1832} 1833 1834// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/BatchCheckLayerAvailabilityRequest 1835type BatchCheckLayerAvailabilityInput struct { 1836 _ struct{} `type:"structure"` 1837 1838 // The digests of the image layers to check. 1839 // 1840 // LayerDigests is a required field 1841 LayerDigests []*string `locationName:"layerDigests" min:"1" type:"list" required:"true"` 1842 1843 // The AWS account ID associated with the registry that contains the image layers 1844 // to check. If you do not specify a registry, the default registry is assumed. 1845 RegistryId *string `locationName:"registryId" type:"string"` 1846 1847 // The name of the repository that is associated with the image layers to check. 1848 // 1849 // RepositoryName is a required field 1850 RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"` 1851} 1852 1853// String returns the string representation 1854func (s BatchCheckLayerAvailabilityInput) String() string { 1855 return awsutil.Prettify(s) 1856} 1857 1858// GoString returns the string representation 1859func (s BatchCheckLayerAvailabilityInput) GoString() string { 1860 return s.String() 1861} 1862 1863// Validate inspects the fields of the type to determine if they are valid. 1864func (s *BatchCheckLayerAvailabilityInput) Validate() error { 1865 invalidParams := request.ErrInvalidParams{Context: "BatchCheckLayerAvailabilityInput"} 1866 if s.LayerDigests == nil { 1867 invalidParams.Add(request.NewErrParamRequired("LayerDigests")) 1868 } 1869 if s.LayerDigests != nil && len(s.LayerDigests) < 1 { 1870 invalidParams.Add(request.NewErrParamMinLen("LayerDigests", 1)) 1871 } 1872 if s.RepositoryName == nil { 1873 invalidParams.Add(request.NewErrParamRequired("RepositoryName")) 1874 } 1875 if s.RepositoryName != nil && len(*s.RepositoryName) < 2 { 1876 invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2)) 1877 } 1878 1879 if invalidParams.Len() > 0 { 1880 return invalidParams 1881 } 1882 return nil 1883} 1884 1885// SetLayerDigests sets the LayerDigests field's value. 1886func (s *BatchCheckLayerAvailabilityInput) SetLayerDigests(v []*string) *BatchCheckLayerAvailabilityInput { 1887 s.LayerDigests = v 1888 return s 1889} 1890 1891// SetRegistryId sets the RegistryId field's value. 1892func (s *BatchCheckLayerAvailabilityInput) SetRegistryId(v string) *BatchCheckLayerAvailabilityInput { 1893 s.RegistryId = &v 1894 return s 1895} 1896 1897// SetRepositoryName sets the RepositoryName field's value. 1898func (s *BatchCheckLayerAvailabilityInput) SetRepositoryName(v string) *BatchCheckLayerAvailabilityInput { 1899 s.RepositoryName = &v 1900 return s 1901} 1902 1903// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/BatchCheckLayerAvailabilityResponse 1904type BatchCheckLayerAvailabilityOutput struct { 1905 _ struct{} `type:"structure"` 1906 1907 // Any failures associated with the call. 1908 Failures []*LayerFailure `locationName:"failures" type:"list"` 1909 1910 // A list of image layer objects corresponding to the image layer references 1911 // in the request. 1912 Layers []*Layer `locationName:"layers" type:"list"` 1913} 1914 1915// String returns the string representation 1916func (s BatchCheckLayerAvailabilityOutput) String() string { 1917 return awsutil.Prettify(s) 1918} 1919 1920// GoString returns the string representation 1921func (s BatchCheckLayerAvailabilityOutput) GoString() string { 1922 return s.String() 1923} 1924 1925// SetFailures sets the Failures field's value. 1926func (s *BatchCheckLayerAvailabilityOutput) SetFailures(v []*LayerFailure) *BatchCheckLayerAvailabilityOutput { 1927 s.Failures = v 1928 return s 1929} 1930 1931// SetLayers sets the Layers field's value. 1932func (s *BatchCheckLayerAvailabilityOutput) SetLayers(v []*Layer) *BatchCheckLayerAvailabilityOutput { 1933 s.Layers = v 1934 return s 1935} 1936 1937// Deletes specified images within a specified repository. Images are specified 1938// with either the imageTag or imageDigest. 1939// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/BatchDeleteImageRequest 1940type BatchDeleteImageInput struct { 1941 _ struct{} `type:"structure"` 1942 1943 // A list of image ID references that correspond to images to delete. The format 1944 // of the imageIds reference is imageTag=tag or imageDigest=digest. 1945 // 1946 // ImageIds is a required field 1947 ImageIds []*ImageIdentifier `locationName:"imageIds" min:"1" type:"list" required:"true"` 1948 1949 // The AWS account ID associated with the registry that contains the image to 1950 // delete. If you do not specify a registry, the default registry is assumed. 1951 RegistryId *string `locationName:"registryId" type:"string"` 1952 1953 // The repository that contains the image to delete. 1954 // 1955 // RepositoryName is a required field 1956 RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"` 1957} 1958 1959// String returns the string representation 1960func (s BatchDeleteImageInput) String() string { 1961 return awsutil.Prettify(s) 1962} 1963 1964// GoString returns the string representation 1965func (s BatchDeleteImageInput) GoString() string { 1966 return s.String() 1967} 1968 1969// Validate inspects the fields of the type to determine if they are valid. 1970func (s *BatchDeleteImageInput) Validate() error { 1971 invalidParams := request.ErrInvalidParams{Context: "BatchDeleteImageInput"} 1972 if s.ImageIds == nil { 1973 invalidParams.Add(request.NewErrParamRequired("ImageIds")) 1974 } 1975 if s.ImageIds != nil && len(s.ImageIds) < 1 { 1976 invalidParams.Add(request.NewErrParamMinLen("ImageIds", 1)) 1977 } 1978 if s.RepositoryName == nil { 1979 invalidParams.Add(request.NewErrParamRequired("RepositoryName")) 1980 } 1981 if s.RepositoryName != nil && len(*s.RepositoryName) < 2 { 1982 invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2)) 1983 } 1984 1985 if invalidParams.Len() > 0 { 1986 return invalidParams 1987 } 1988 return nil 1989} 1990 1991// SetImageIds sets the ImageIds field's value. 1992func (s *BatchDeleteImageInput) SetImageIds(v []*ImageIdentifier) *BatchDeleteImageInput { 1993 s.ImageIds = v 1994 return s 1995} 1996 1997// SetRegistryId sets the RegistryId field's value. 1998func (s *BatchDeleteImageInput) SetRegistryId(v string) *BatchDeleteImageInput { 1999 s.RegistryId = &v 2000 return s 2001} 2002 2003// SetRepositoryName sets the RepositoryName field's value. 2004func (s *BatchDeleteImageInput) SetRepositoryName(v string) *BatchDeleteImageInput { 2005 s.RepositoryName = &v 2006 return s 2007} 2008 2009// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/BatchDeleteImageResponse 2010type BatchDeleteImageOutput struct { 2011 _ struct{} `type:"structure"` 2012 2013 // Any failures associated with the call. 2014 Failures []*ImageFailure `locationName:"failures" type:"list"` 2015 2016 // The image IDs of the deleted images. 2017 ImageIds []*ImageIdentifier `locationName:"imageIds" min:"1" type:"list"` 2018} 2019 2020// String returns the string representation 2021func (s BatchDeleteImageOutput) String() string { 2022 return awsutil.Prettify(s) 2023} 2024 2025// GoString returns the string representation 2026func (s BatchDeleteImageOutput) GoString() string { 2027 return s.String() 2028} 2029 2030// SetFailures sets the Failures field's value. 2031func (s *BatchDeleteImageOutput) SetFailures(v []*ImageFailure) *BatchDeleteImageOutput { 2032 s.Failures = v 2033 return s 2034} 2035 2036// SetImageIds sets the ImageIds field's value. 2037func (s *BatchDeleteImageOutput) SetImageIds(v []*ImageIdentifier) *BatchDeleteImageOutput { 2038 s.ImageIds = v 2039 return s 2040} 2041 2042// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/BatchGetImageRequest 2043type BatchGetImageInput struct { 2044 _ struct{} `type:"structure"` 2045 2046 // The accepted media types for the request. 2047 // 2048 // Valid values: application/vnd.docker.distribution.manifest.v1+json | application/vnd.docker.distribution.manifest.v2+json 2049 // | application/vnd.oci.image.manifest.v1+json 2050 AcceptedMediaTypes []*string `locationName:"acceptedMediaTypes" min:"1" type:"list"` 2051 2052 // A list of image ID references that correspond to images to describe. The 2053 // format of the imageIds reference is imageTag=tag or imageDigest=digest. 2054 // 2055 // ImageIds is a required field 2056 ImageIds []*ImageIdentifier `locationName:"imageIds" min:"1" type:"list" required:"true"` 2057 2058 // The AWS account ID associated with the registry that contains the images 2059 // to describe. If you do not specify a registry, the default registry is assumed. 2060 RegistryId *string `locationName:"registryId" type:"string"` 2061 2062 // The repository that contains the images to describe. 2063 // 2064 // RepositoryName is a required field 2065 RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"` 2066} 2067 2068// String returns the string representation 2069func (s BatchGetImageInput) String() string { 2070 return awsutil.Prettify(s) 2071} 2072 2073// GoString returns the string representation 2074func (s BatchGetImageInput) GoString() string { 2075 return s.String() 2076} 2077 2078// Validate inspects the fields of the type to determine if they are valid. 2079func (s *BatchGetImageInput) Validate() error { 2080 invalidParams := request.ErrInvalidParams{Context: "BatchGetImageInput"} 2081 if s.AcceptedMediaTypes != nil && len(s.AcceptedMediaTypes) < 1 { 2082 invalidParams.Add(request.NewErrParamMinLen("AcceptedMediaTypes", 1)) 2083 } 2084 if s.ImageIds == nil { 2085 invalidParams.Add(request.NewErrParamRequired("ImageIds")) 2086 } 2087 if s.ImageIds != nil && len(s.ImageIds) < 1 { 2088 invalidParams.Add(request.NewErrParamMinLen("ImageIds", 1)) 2089 } 2090 if s.RepositoryName == nil { 2091 invalidParams.Add(request.NewErrParamRequired("RepositoryName")) 2092 } 2093 if s.RepositoryName != nil && len(*s.RepositoryName) < 2 { 2094 invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2)) 2095 } 2096 2097 if invalidParams.Len() > 0 { 2098 return invalidParams 2099 } 2100 return nil 2101} 2102 2103// SetAcceptedMediaTypes sets the AcceptedMediaTypes field's value. 2104func (s *BatchGetImageInput) SetAcceptedMediaTypes(v []*string) *BatchGetImageInput { 2105 s.AcceptedMediaTypes = v 2106 return s 2107} 2108 2109// SetImageIds sets the ImageIds field's value. 2110func (s *BatchGetImageInput) SetImageIds(v []*ImageIdentifier) *BatchGetImageInput { 2111 s.ImageIds = v 2112 return s 2113} 2114 2115// SetRegistryId sets the RegistryId field's value. 2116func (s *BatchGetImageInput) SetRegistryId(v string) *BatchGetImageInput { 2117 s.RegistryId = &v 2118 return s 2119} 2120 2121// SetRepositoryName sets the RepositoryName field's value. 2122func (s *BatchGetImageInput) SetRepositoryName(v string) *BatchGetImageInput { 2123 s.RepositoryName = &v 2124 return s 2125} 2126 2127// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/BatchGetImageResponse 2128type BatchGetImageOutput struct { 2129 _ struct{} `type:"structure"` 2130 2131 // Any failures associated with the call. 2132 Failures []*ImageFailure `locationName:"failures" type:"list"` 2133 2134 // A list of image objects corresponding to the image references in the request. 2135 Images []*Image `locationName:"images" type:"list"` 2136} 2137 2138// String returns the string representation 2139func (s BatchGetImageOutput) String() string { 2140 return awsutil.Prettify(s) 2141} 2142 2143// GoString returns the string representation 2144func (s BatchGetImageOutput) GoString() string { 2145 return s.String() 2146} 2147 2148// SetFailures sets the Failures field's value. 2149func (s *BatchGetImageOutput) SetFailures(v []*ImageFailure) *BatchGetImageOutput { 2150 s.Failures = v 2151 return s 2152} 2153 2154// SetImages sets the Images field's value. 2155func (s *BatchGetImageOutput) SetImages(v []*Image) *BatchGetImageOutput { 2156 s.Images = v 2157 return s 2158} 2159 2160// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/CompleteLayerUploadRequest 2161type CompleteLayerUploadInput struct { 2162 _ struct{} `type:"structure"` 2163 2164 // The sha256 digest of the image layer. 2165 // 2166 // LayerDigests is a required field 2167 LayerDigests []*string `locationName:"layerDigests" min:"1" type:"list" required:"true"` 2168 2169 // The AWS account ID associated with the registry to which to upload layers. 2170 // If you do not specify a registry, the default registry is assumed. 2171 RegistryId *string `locationName:"registryId" type:"string"` 2172 2173 // The name of the repository to associate with the image layer. 2174 // 2175 // RepositoryName is a required field 2176 RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"` 2177 2178 // The upload ID from a previous InitiateLayerUpload operation to associate 2179 // with the image layer. 2180 // 2181 // UploadId is a required field 2182 UploadId *string `locationName:"uploadId" type:"string" required:"true"` 2183} 2184 2185// String returns the string representation 2186func (s CompleteLayerUploadInput) String() string { 2187 return awsutil.Prettify(s) 2188} 2189 2190// GoString returns the string representation 2191func (s CompleteLayerUploadInput) GoString() string { 2192 return s.String() 2193} 2194 2195// Validate inspects the fields of the type to determine if they are valid. 2196func (s *CompleteLayerUploadInput) Validate() error { 2197 invalidParams := request.ErrInvalidParams{Context: "CompleteLayerUploadInput"} 2198 if s.LayerDigests == nil { 2199 invalidParams.Add(request.NewErrParamRequired("LayerDigests")) 2200 } 2201 if s.LayerDigests != nil && len(s.LayerDigests) < 1 { 2202 invalidParams.Add(request.NewErrParamMinLen("LayerDigests", 1)) 2203 } 2204 if s.RepositoryName == nil { 2205 invalidParams.Add(request.NewErrParamRequired("RepositoryName")) 2206 } 2207 if s.RepositoryName != nil && len(*s.RepositoryName) < 2 { 2208 invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2)) 2209 } 2210 if s.UploadId == nil { 2211 invalidParams.Add(request.NewErrParamRequired("UploadId")) 2212 } 2213 2214 if invalidParams.Len() > 0 { 2215 return invalidParams 2216 } 2217 return nil 2218} 2219 2220// SetLayerDigests sets the LayerDigests field's value. 2221func (s *CompleteLayerUploadInput) SetLayerDigests(v []*string) *CompleteLayerUploadInput { 2222 s.LayerDigests = v 2223 return s 2224} 2225 2226// SetRegistryId sets the RegistryId field's value. 2227func (s *CompleteLayerUploadInput) SetRegistryId(v string) *CompleteLayerUploadInput { 2228 s.RegistryId = &v 2229 return s 2230} 2231 2232// SetRepositoryName sets the RepositoryName field's value. 2233func (s *CompleteLayerUploadInput) SetRepositoryName(v string) *CompleteLayerUploadInput { 2234 s.RepositoryName = &v 2235 return s 2236} 2237 2238// SetUploadId sets the UploadId field's value. 2239func (s *CompleteLayerUploadInput) SetUploadId(v string) *CompleteLayerUploadInput { 2240 s.UploadId = &v 2241 return s 2242} 2243 2244// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/CompleteLayerUploadResponse 2245type CompleteLayerUploadOutput struct { 2246 _ struct{} `type:"structure"` 2247 2248 // The sha256 digest of the image layer. 2249 LayerDigest *string `locationName:"layerDigest" type:"string"` 2250 2251 // The registry ID associated with the request. 2252 RegistryId *string `locationName:"registryId" type:"string"` 2253 2254 // The repository name associated with the request. 2255 RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"` 2256 2257 // The upload ID associated with the layer. 2258 UploadId *string `locationName:"uploadId" type:"string"` 2259} 2260 2261// String returns the string representation 2262func (s CompleteLayerUploadOutput) String() string { 2263 return awsutil.Prettify(s) 2264} 2265 2266// GoString returns the string representation 2267func (s CompleteLayerUploadOutput) GoString() string { 2268 return s.String() 2269} 2270 2271// SetLayerDigest sets the LayerDigest field's value. 2272func (s *CompleteLayerUploadOutput) SetLayerDigest(v string) *CompleteLayerUploadOutput { 2273 s.LayerDigest = &v 2274 return s 2275} 2276 2277// SetRegistryId sets the RegistryId field's value. 2278func (s *CompleteLayerUploadOutput) SetRegistryId(v string) *CompleteLayerUploadOutput { 2279 s.RegistryId = &v 2280 return s 2281} 2282 2283// SetRepositoryName sets the RepositoryName field's value. 2284func (s *CompleteLayerUploadOutput) SetRepositoryName(v string) *CompleteLayerUploadOutput { 2285 s.RepositoryName = &v 2286 return s 2287} 2288 2289// SetUploadId sets the UploadId field's value. 2290func (s *CompleteLayerUploadOutput) SetUploadId(v string) *CompleteLayerUploadOutput { 2291 s.UploadId = &v 2292 return s 2293} 2294 2295// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/CreateRepositoryRequest 2296type CreateRepositoryInput struct { 2297 _ struct{} `type:"structure"` 2298 2299 // The name to use for the repository. The repository name may be specified 2300 // on its own (such as nginx-web-app) or it can be prepended with a namespace 2301 // to group the repository into a category (such as project-a/nginx-web-app). 2302 // 2303 // RepositoryName is a required field 2304 RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"` 2305} 2306 2307// String returns the string representation 2308func (s CreateRepositoryInput) String() string { 2309 return awsutil.Prettify(s) 2310} 2311 2312// GoString returns the string representation 2313func (s CreateRepositoryInput) GoString() string { 2314 return s.String() 2315} 2316 2317// Validate inspects the fields of the type to determine if they are valid. 2318func (s *CreateRepositoryInput) Validate() error { 2319 invalidParams := request.ErrInvalidParams{Context: "CreateRepositoryInput"} 2320 if s.RepositoryName == nil { 2321 invalidParams.Add(request.NewErrParamRequired("RepositoryName")) 2322 } 2323 if s.RepositoryName != nil && len(*s.RepositoryName) < 2 { 2324 invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2)) 2325 } 2326 2327 if invalidParams.Len() > 0 { 2328 return invalidParams 2329 } 2330 return nil 2331} 2332 2333// SetRepositoryName sets the RepositoryName field's value. 2334func (s *CreateRepositoryInput) SetRepositoryName(v string) *CreateRepositoryInput { 2335 s.RepositoryName = &v 2336 return s 2337} 2338 2339// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/CreateRepositoryResponse 2340type CreateRepositoryOutput struct { 2341 _ struct{} `type:"structure"` 2342 2343 // The repository that was created. 2344 Repository *Repository `locationName:"repository" type:"structure"` 2345} 2346 2347// String returns the string representation 2348func (s CreateRepositoryOutput) String() string { 2349 return awsutil.Prettify(s) 2350} 2351 2352// GoString returns the string representation 2353func (s CreateRepositoryOutput) GoString() string { 2354 return s.String() 2355} 2356 2357// SetRepository sets the Repository field's value. 2358func (s *CreateRepositoryOutput) SetRepository(v *Repository) *CreateRepositoryOutput { 2359 s.Repository = v 2360 return s 2361} 2362 2363// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DeleteRepositoryRequest 2364type DeleteRepositoryInput struct { 2365 _ struct{} `type:"structure"` 2366 2367 // Force the deletion of the repository if it contains images. 2368 Force *bool `locationName:"force" type:"boolean"` 2369 2370 // The AWS account ID associated with the registry that contains the repository 2371 // to delete. If you do not specify a registry, the default registry is assumed. 2372 RegistryId *string `locationName:"registryId" type:"string"` 2373 2374 // The name of the repository to delete. 2375 // 2376 // RepositoryName is a required field 2377 RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"` 2378} 2379 2380// String returns the string representation 2381func (s DeleteRepositoryInput) String() string { 2382 return awsutil.Prettify(s) 2383} 2384 2385// GoString returns the string representation 2386func (s DeleteRepositoryInput) GoString() string { 2387 return s.String() 2388} 2389 2390// Validate inspects the fields of the type to determine if they are valid. 2391func (s *DeleteRepositoryInput) Validate() error { 2392 invalidParams := request.ErrInvalidParams{Context: "DeleteRepositoryInput"} 2393 if s.RepositoryName == nil { 2394 invalidParams.Add(request.NewErrParamRequired("RepositoryName")) 2395 } 2396 if s.RepositoryName != nil && len(*s.RepositoryName) < 2 { 2397 invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2)) 2398 } 2399 2400 if invalidParams.Len() > 0 { 2401 return invalidParams 2402 } 2403 return nil 2404} 2405 2406// SetForce sets the Force field's value. 2407func (s *DeleteRepositoryInput) SetForce(v bool) *DeleteRepositoryInput { 2408 s.Force = &v 2409 return s 2410} 2411 2412// SetRegistryId sets the RegistryId field's value. 2413func (s *DeleteRepositoryInput) SetRegistryId(v string) *DeleteRepositoryInput { 2414 s.RegistryId = &v 2415 return s 2416} 2417 2418// SetRepositoryName sets the RepositoryName field's value. 2419func (s *DeleteRepositoryInput) SetRepositoryName(v string) *DeleteRepositoryInput { 2420 s.RepositoryName = &v 2421 return s 2422} 2423 2424// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DeleteRepositoryResponse 2425type DeleteRepositoryOutput struct { 2426 _ struct{} `type:"structure"` 2427 2428 // The repository that was deleted. 2429 Repository *Repository `locationName:"repository" type:"structure"` 2430} 2431 2432// String returns the string representation 2433func (s DeleteRepositoryOutput) String() string { 2434 return awsutil.Prettify(s) 2435} 2436 2437// GoString returns the string representation 2438func (s DeleteRepositoryOutput) GoString() string { 2439 return s.String() 2440} 2441 2442// SetRepository sets the Repository field's value. 2443func (s *DeleteRepositoryOutput) SetRepository(v *Repository) *DeleteRepositoryOutput { 2444 s.Repository = v 2445 return s 2446} 2447 2448// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DeleteRepositoryPolicyRequest 2449type DeleteRepositoryPolicyInput struct { 2450 _ struct{} `type:"structure"` 2451 2452 // The AWS account ID associated with the registry that contains the repository 2453 // policy to delete. If you do not specify a registry, the default registry 2454 // is assumed. 2455 RegistryId *string `locationName:"registryId" type:"string"` 2456 2457 // The name of the repository that is associated with the repository policy 2458 // to delete. 2459 // 2460 // RepositoryName is a required field 2461 RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"` 2462} 2463 2464// String returns the string representation 2465func (s DeleteRepositoryPolicyInput) String() string { 2466 return awsutil.Prettify(s) 2467} 2468 2469// GoString returns the string representation 2470func (s DeleteRepositoryPolicyInput) GoString() string { 2471 return s.String() 2472} 2473 2474// Validate inspects the fields of the type to determine if they are valid. 2475func (s *DeleteRepositoryPolicyInput) Validate() error { 2476 invalidParams := request.ErrInvalidParams{Context: "DeleteRepositoryPolicyInput"} 2477 if s.RepositoryName == nil { 2478 invalidParams.Add(request.NewErrParamRequired("RepositoryName")) 2479 } 2480 if s.RepositoryName != nil && len(*s.RepositoryName) < 2 { 2481 invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2)) 2482 } 2483 2484 if invalidParams.Len() > 0 { 2485 return invalidParams 2486 } 2487 return nil 2488} 2489 2490// SetRegistryId sets the RegistryId field's value. 2491func (s *DeleteRepositoryPolicyInput) SetRegistryId(v string) *DeleteRepositoryPolicyInput { 2492 s.RegistryId = &v 2493 return s 2494} 2495 2496// SetRepositoryName sets the RepositoryName field's value. 2497func (s *DeleteRepositoryPolicyInput) SetRepositoryName(v string) *DeleteRepositoryPolicyInput { 2498 s.RepositoryName = &v 2499 return s 2500} 2501 2502// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DeleteRepositoryPolicyResponse 2503type DeleteRepositoryPolicyOutput struct { 2504 _ struct{} `type:"structure"` 2505 2506 // The JSON repository policy that was deleted from the repository. 2507 PolicyText *string `locationName:"policyText" type:"string"` 2508 2509 // The registry ID associated with the request. 2510 RegistryId *string `locationName:"registryId" type:"string"` 2511 2512 // The repository name associated with the request. 2513 RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"` 2514} 2515 2516// String returns the string representation 2517func (s DeleteRepositoryPolicyOutput) String() string { 2518 return awsutil.Prettify(s) 2519} 2520 2521// GoString returns the string representation 2522func (s DeleteRepositoryPolicyOutput) GoString() string { 2523 return s.String() 2524} 2525 2526// SetPolicyText sets the PolicyText field's value. 2527func (s *DeleteRepositoryPolicyOutput) SetPolicyText(v string) *DeleteRepositoryPolicyOutput { 2528 s.PolicyText = &v 2529 return s 2530} 2531 2532// SetRegistryId sets the RegistryId field's value. 2533func (s *DeleteRepositoryPolicyOutput) SetRegistryId(v string) *DeleteRepositoryPolicyOutput { 2534 s.RegistryId = &v 2535 return s 2536} 2537 2538// SetRepositoryName sets the RepositoryName field's value. 2539func (s *DeleteRepositoryPolicyOutput) SetRepositoryName(v string) *DeleteRepositoryPolicyOutput { 2540 s.RepositoryName = &v 2541 return s 2542} 2543 2544// An object representing a filter on a DescribeImages operation. 2545// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DescribeImagesFilter 2546type DescribeImagesFilter struct { 2547 _ struct{} `type:"structure"` 2548 2549 // The tag status with which to filter your DescribeImages results. You can 2550 // filter results based on whether they are TAGGED or UNTAGGED. 2551 TagStatus *string `locationName:"tagStatus" type:"string" enum:"TagStatus"` 2552} 2553 2554// String returns the string representation 2555func (s DescribeImagesFilter) String() string { 2556 return awsutil.Prettify(s) 2557} 2558 2559// GoString returns the string representation 2560func (s DescribeImagesFilter) GoString() string { 2561 return s.String() 2562} 2563 2564// SetTagStatus sets the TagStatus field's value. 2565func (s *DescribeImagesFilter) SetTagStatus(v string) *DescribeImagesFilter { 2566 s.TagStatus = &v 2567 return s 2568} 2569 2570// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DescribeImagesRequest 2571type DescribeImagesInput struct { 2572 _ struct{} `type:"structure"` 2573 2574 // The filter key and value with which to filter your DescribeImages results. 2575 Filter *DescribeImagesFilter `locationName:"filter" type:"structure"` 2576 2577 // The list of image IDs for the requested repository. 2578 ImageIds []*ImageIdentifier `locationName:"imageIds" min:"1" type:"list"` 2579 2580 // The maximum number of repository results returned by DescribeImages in paginated 2581 // output. When this parameter is used, DescribeImages only returns maxResults 2582 // results in a single page along with a nextToken response element. The remaining 2583 // results of the initial request can be seen by sending another DescribeImages 2584 // request with the returned nextToken value. This value can be between 1 and 2585 // 100. If this parameter is not used, then DescribeImages returns up to 100 2586 // results and a nextToken value, if applicable. 2587 MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"` 2588 2589 // The nextToken value returned from a previous paginated DescribeImages request 2590 // where maxResults was used and the results exceeded the value of that parameter. 2591 // Pagination continues from the end of the previous results that returned the 2592 // nextToken value. This value is null when there are no more results to return. 2593 NextToken *string `locationName:"nextToken" type:"string"` 2594 2595 // The AWS account ID associated with the registry that contains the repository 2596 // in which to describe images. If you do not specify a registry, the default 2597 // registry is assumed. 2598 RegistryId *string `locationName:"registryId" type:"string"` 2599 2600 // A list of repositories to describe. If this parameter is omitted, then all 2601 // repositories in a registry are described. 2602 // 2603 // RepositoryName is a required field 2604 RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"` 2605} 2606 2607// String returns the string representation 2608func (s DescribeImagesInput) String() string { 2609 return awsutil.Prettify(s) 2610} 2611 2612// GoString returns the string representation 2613func (s DescribeImagesInput) GoString() string { 2614 return s.String() 2615} 2616 2617// Validate inspects the fields of the type to determine if they are valid. 2618func (s *DescribeImagesInput) Validate() error { 2619 invalidParams := request.ErrInvalidParams{Context: "DescribeImagesInput"} 2620 if s.ImageIds != nil && len(s.ImageIds) < 1 { 2621 invalidParams.Add(request.NewErrParamMinLen("ImageIds", 1)) 2622 } 2623 if s.MaxResults != nil && *s.MaxResults < 1 { 2624 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 2625 } 2626 if s.RepositoryName == nil { 2627 invalidParams.Add(request.NewErrParamRequired("RepositoryName")) 2628 } 2629 if s.RepositoryName != nil && len(*s.RepositoryName) < 2 { 2630 invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2)) 2631 } 2632 2633 if invalidParams.Len() > 0 { 2634 return invalidParams 2635 } 2636 return nil 2637} 2638 2639// SetFilter sets the Filter field's value. 2640func (s *DescribeImagesInput) SetFilter(v *DescribeImagesFilter) *DescribeImagesInput { 2641 s.Filter = v 2642 return s 2643} 2644 2645// SetImageIds sets the ImageIds field's value. 2646func (s *DescribeImagesInput) SetImageIds(v []*ImageIdentifier) *DescribeImagesInput { 2647 s.ImageIds = v 2648 return s 2649} 2650 2651// SetMaxResults sets the MaxResults field's value. 2652func (s *DescribeImagesInput) SetMaxResults(v int64) *DescribeImagesInput { 2653 s.MaxResults = &v 2654 return s 2655} 2656 2657// SetNextToken sets the NextToken field's value. 2658func (s *DescribeImagesInput) SetNextToken(v string) *DescribeImagesInput { 2659 s.NextToken = &v 2660 return s 2661} 2662 2663// SetRegistryId sets the RegistryId field's value. 2664func (s *DescribeImagesInput) SetRegistryId(v string) *DescribeImagesInput { 2665 s.RegistryId = &v 2666 return s 2667} 2668 2669// SetRepositoryName sets the RepositoryName field's value. 2670func (s *DescribeImagesInput) SetRepositoryName(v string) *DescribeImagesInput { 2671 s.RepositoryName = &v 2672 return s 2673} 2674 2675// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DescribeImagesResponse 2676type DescribeImagesOutput struct { 2677 _ struct{} `type:"structure"` 2678 2679 // A list of ImageDetail objects that contain data about the image. 2680 ImageDetails []*ImageDetail `locationName:"imageDetails" type:"list"` 2681 2682 // The nextToken value to include in a future DescribeImages request. When the 2683 // results of a DescribeImages request exceed maxResults, this value can be 2684 // used to retrieve the next page of results. This value is null when there 2685 // are no more results to return. 2686 NextToken *string `locationName:"nextToken" type:"string"` 2687} 2688 2689// String returns the string representation 2690func (s DescribeImagesOutput) String() string { 2691 return awsutil.Prettify(s) 2692} 2693 2694// GoString returns the string representation 2695func (s DescribeImagesOutput) GoString() string { 2696 return s.String() 2697} 2698 2699// SetImageDetails sets the ImageDetails field's value. 2700func (s *DescribeImagesOutput) SetImageDetails(v []*ImageDetail) *DescribeImagesOutput { 2701 s.ImageDetails = v 2702 return s 2703} 2704 2705// SetNextToken sets the NextToken field's value. 2706func (s *DescribeImagesOutput) SetNextToken(v string) *DescribeImagesOutput { 2707 s.NextToken = &v 2708 return s 2709} 2710 2711// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DescribeRepositoriesRequest 2712type DescribeRepositoriesInput struct { 2713 _ struct{} `type:"structure"` 2714 2715 // The maximum number of repository results returned by DescribeRepositories 2716 // in paginated output. When this parameter is used, DescribeRepositories only 2717 // returns maxResults results in a single page along with a nextToken response 2718 // element. The remaining results of the initial request can be seen by sending 2719 // another DescribeRepositories request with the returned nextToken value. This 2720 // value can be between 1 and 100. If this parameter is not used, then DescribeRepositories 2721 // returns up to 100 results and a nextToken value, if applicable. 2722 MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"` 2723 2724 // The nextToken value returned from a previous paginated DescribeRepositories 2725 // request where maxResults was used and the results exceeded the value of that 2726 // parameter. Pagination continues from the end of the previous results that 2727 // returned the nextToken value. This value is null when there are no more results 2728 // to return. 2729 // 2730 // This token should be treated as an opaque identifier that is only used to 2731 // retrieve the next items in a list and not for other programmatic purposes. 2732 NextToken *string `locationName:"nextToken" type:"string"` 2733 2734 // The AWS account ID associated with the registry that contains the repositories 2735 // to be described. If you do not specify a registry, the default registry is 2736 // assumed. 2737 RegistryId *string `locationName:"registryId" type:"string"` 2738 2739 // A list of repositories to describe. If this parameter is omitted, then all 2740 // repositories in a registry are described. 2741 RepositoryNames []*string `locationName:"repositoryNames" min:"1" type:"list"` 2742} 2743 2744// String returns the string representation 2745func (s DescribeRepositoriesInput) String() string { 2746 return awsutil.Prettify(s) 2747} 2748 2749// GoString returns the string representation 2750func (s DescribeRepositoriesInput) GoString() string { 2751 return s.String() 2752} 2753 2754// Validate inspects the fields of the type to determine if they are valid. 2755func (s *DescribeRepositoriesInput) Validate() error { 2756 invalidParams := request.ErrInvalidParams{Context: "DescribeRepositoriesInput"} 2757 if s.MaxResults != nil && *s.MaxResults < 1 { 2758 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 2759 } 2760 if s.RepositoryNames != nil && len(s.RepositoryNames) < 1 { 2761 invalidParams.Add(request.NewErrParamMinLen("RepositoryNames", 1)) 2762 } 2763 2764 if invalidParams.Len() > 0 { 2765 return invalidParams 2766 } 2767 return nil 2768} 2769 2770// SetMaxResults sets the MaxResults field's value. 2771func (s *DescribeRepositoriesInput) SetMaxResults(v int64) *DescribeRepositoriesInput { 2772 s.MaxResults = &v 2773 return s 2774} 2775 2776// SetNextToken sets the NextToken field's value. 2777func (s *DescribeRepositoriesInput) SetNextToken(v string) *DescribeRepositoriesInput { 2778 s.NextToken = &v 2779 return s 2780} 2781 2782// SetRegistryId sets the RegistryId field's value. 2783func (s *DescribeRepositoriesInput) SetRegistryId(v string) *DescribeRepositoriesInput { 2784 s.RegistryId = &v 2785 return s 2786} 2787 2788// SetRepositoryNames sets the RepositoryNames field's value. 2789func (s *DescribeRepositoriesInput) SetRepositoryNames(v []*string) *DescribeRepositoriesInput { 2790 s.RepositoryNames = v 2791 return s 2792} 2793 2794// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DescribeRepositoriesResponse 2795type DescribeRepositoriesOutput struct { 2796 _ struct{} `type:"structure"` 2797 2798 // The nextToken value to include in a future DescribeRepositories request. 2799 // When the results of a DescribeRepositories request exceed maxResults, this 2800 // value can be used to retrieve the next page of results. This value is null 2801 // when there are no more results to return. 2802 NextToken *string `locationName:"nextToken" type:"string"` 2803 2804 // A list of repository objects corresponding to valid repositories. 2805 Repositories []*Repository `locationName:"repositories" type:"list"` 2806} 2807 2808// String returns the string representation 2809func (s DescribeRepositoriesOutput) String() string { 2810 return awsutil.Prettify(s) 2811} 2812 2813// GoString returns the string representation 2814func (s DescribeRepositoriesOutput) GoString() string { 2815 return s.String() 2816} 2817 2818// SetNextToken sets the NextToken field's value. 2819func (s *DescribeRepositoriesOutput) SetNextToken(v string) *DescribeRepositoriesOutput { 2820 s.NextToken = &v 2821 return s 2822} 2823 2824// SetRepositories sets the Repositories field's value. 2825func (s *DescribeRepositoriesOutput) SetRepositories(v []*Repository) *DescribeRepositoriesOutput { 2826 s.Repositories = v 2827 return s 2828} 2829 2830// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetAuthorizationTokenRequest 2831type GetAuthorizationTokenInput struct { 2832 _ struct{} `type:"structure"` 2833 2834 // A list of AWS account IDs that are associated with the registries for which 2835 // to get authorization tokens. If you do not specify a registry, the default 2836 // registry is assumed. 2837 RegistryIds []*string `locationName:"registryIds" min:"1" type:"list"` 2838} 2839 2840// String returns the string representation 2841func (s GetAuthorizationTokenInput) String() string { 2842 return awsutil.Prettify(s) 2843} 2844 2845// GoString returns the string representation 2846func (s GetAuthorizationTokenInput) GoString() string { 2847 return s.String() 2848} 2849 2850// Validate inspects the fields of the type to determine if they are valid. 2851func (s *GetAuthorizationTokenInput) Validate() error { 2852 invalidParams := request.ErrInvalidParams{Context: "GetAuthorizationTokenInput"} 2853 if s.RegistryIds != nil && len(s.RegistryIds) < 1 { 2854 invalidParams.Add(request.NewErrParamMinLen("RegistryIds", 1)) 2855 } 2856 2857 if invalidParams.Len() > 0 { 2858 return invalidParams 2859 } 2860 return nil 2861} 2862 2863// SetRegistryIds sets the RegistryIds field's value. 2864func (s *GetAuthorizationTokenInput) SetRegistryIds(v []*string) *GetAuthorizationTokenInput { 2865 s.RegistryIds = v 2866 return s 2867} 2868 2869// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetAuthorizationTokenResponse 2870type GetAuthorizationTokenOutput struct { 2871 _ struct{} `type:"structure"` 2872 2873 // A list of authorization token data objects that correspond to the registryIds 2874 // values in the request. 2875 AuthorizationData []*AuthorizationData `locationName:"authorizationData" type:"list"` 2876} 2877 2878// String returns the string representation 2879func (s GetAuthorizationTokenOutput) String() string { 2880 return awsutil.Prettify(s) 2881} 2882 2883// GoString returns the string representation 2884func (s GetAuthorizationTokenOutput) GoString() string { 2885 return s.String() 2886} 2887 2888// SetAuthorizationData sets the AuthorizationData field's value. 2889func (s *GetAuthorizationTokenOutput) SetAuthorizationData(v []*AuthorizationData) *GetAuthorizationTokenOutput { 2890 s.AuthorizationData = v 2891 return s 2892} 2893 2894// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetDownloadUrlForLayerRequest 2895type GetDownloadUrlForLayerInput struct { 2896 _ struct{} `type:"structure"` 2897 2898 // The digest of the image layer to download. 2899 // 2900 // LayerDigest is a required field 2901 LayerDigest *string `locationName:"layerDigest" type:"string" required:"true"` 2902 2903 // The AWS account ID associated with the registry that contains the image layer 2904 // to download. If you do not specify a registry, the default registry is assumed. 2905 RegistryId *string `locationName:"registryId" type:"string"` 2906 2907 // The name of the repository that is associated with the image layer to download. 2908 // 2909 // RepositoryName is a required field 2910 RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"` 2911} 2912 2913// String returns the string representation 2914func (s GetDownloadUrlForLayerInput) String() string { 2915 return awsutil.Prettify(s) 2916} 2917 2918// GoString returns the string representation 2919func (s GetDownloadUrlForLayerInput) GoString() string { 2920 return s.String() 2921} 2922 2923// Validate inspects the fields of the type to determine if they are valid. 2924func (s *GetDownloadUrlForLayerInput) Validate() error { 2925 invalidParams := request.ErrInvalidParams{Context: "GetDownloadUrlForLayerInput"} 2926 if s.LayerDigest == nil { 2927 invalidParams.Add(request.NewErrParamRequired("LayerDigest")) 2928 } 2929 if s.RepositoryName == nil { 2930 invalidParams.Add(request.NewErrParamRequired("RepositoryName")) 2931 } 2932 if s.RepositoryName != nil && len(*s.RepositoryName) < 2 { 2933 invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2)) 2934 } 2935 2936 if invalidParams.Len() > 0 { 2937 return invalidParams 2938 } 2939 return nil 2940} 2941 2942// SetLayerDigest sets the LayerDigest field's value. 2943func (s *GetDownloadUrlForLayerInput) SetLayerDigest(v string) *GetDownloadUrlForLayerInput { 2944 s.LayerDigest = &v 2945 return s 2946} 2947 2948// SetRegistryId sets the RegistryId field's value. 2949func (s *GetDownloadUrlForLayerInput) SetRegistryId(v string) *GetDownloadUrlForLayerInput { 2950 s.RegistryId = &v 2951 return s 2952} 2953 2954// SetRepositoryName sets the RepositoryName field's value. 2955func (s *GetDownloadUrlForLayerInput) SetRepositoryName(v string) *GetDownloadUrlForLayerInput { 2956 s.RepositoryName = &v 2957 return s 2958} 2959 2960// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetDownloadUrlForLayerResponse 2961type GetDownloadUrlForLayerOutput struct { 2962 _ struct{} `type:"structure"` 2963 2964 // The pre-signed Amazon S3 download URL for the requested layer. 2965 DownloadUrl *string `locationName:"downloadUrl" type:"string"` 2966 2967 // The digest of the image layer to download. 2968 LayerDigest *string `locationName:"layerDigest" type:"string"` 2969} 2970 2971// String returns the string representation 2972func (s GetDownloadUrlForLayerOutput) String() string { 2973 return awsutil.Prettify(s) 2974} 2975 2976// GoString returns the string representation 2977func (s GetDownloadUrlForLayerOutput) GoString() string { 2978 return s.String() 2979} 2980 2981// SetDownloadUrl sets the DownloadUrl field's value. 2982func (s *GetDownloadUrlForLayerOutput) SetDownloadUrl(v string) *GetDownloadUrlForLayerOutput { 2983 s.DownloadUrl = &v 2984 return s 2985} 2986 2987// SetLayerDigest sets the LayerDigest field's value. 2988func (s *GetDownloadUrlForLayerOutput) SetLayerDigest(v string) *GetDownloadUrlForLayerOutput { 2989 s.LayerDigest = &v 2990 return s 2991} 2992 2993// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetRepositoryPolicyRequest 2994type GetRepositoryPolicyInput struct { 2995 _ struct{} `type:"structure"` 2996 2997 // The AWS account ID associated with the registry that contains the repository. 2998 // If you do not specify a registry, the default registry is assumed. 2999 RegistryId *string `locationName:"registryId" type:"string"` 3000 3001 // The name of the repository whose policy you want to retrieve. 3002 // 3003 // RepositoryName is a required field 3004 RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"` 3005} 3006 3007// String returns the string representation 3008func (s GetRepositoryPolicyInput) String() string { 3009 return awsutil.Prettify(s) 3010} 3011 3012// GoString returns the string representation 3013func (s GetRepositoryPolicyInput) GoString() string { 3014 return s.String() 3015} 3016 3017// Validate inspects the fields of the type to determine if they are valid. 3018func (s *GetRepositoryPolicyInput) Validate() error { 3019 invalidParams := request.ErrInvalidParams{Context: "GetRepositoryPolicyInput"} 3020 if s.RepositoryName == nil { 3021 invalidParams.Add(request.NewErrParamRequired("RepositoryName")) 3022 } 3023 if s.RepositoryName != nil && len(*s.RepositoryName) < 2 { 3024 invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2)) 3025 } 3026 3027 if invalidParams.Len() > 0 { 3028 return invalidParams 3029 } 3030 return nil 3031} 3032 3033// SetRegistryId sets the RegistryId field's value. 3034func (s *GetRepositoryPolicyInput) SetRegistryId(v string) *GetRepositoryPolicyInput { 3035 s.RegistryId = &v 3036 return s 3037} 3038 3039// SetRepositoryName sets the RepositoryName field's value. 3040func (s *GetRepositoryPolicyInput) SetRepositoryName(v string) *GetRepositoryPolicyInput { 3041 s.RepositoryName = &v 3042 return s 3043} 3044 3045// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetRepositoryPolicyResponse 3046type GetRepositoryPolicyOutput struct { 3047 _ struct{} `type:"structure"` 3048 3049 // The JSON repository policy text associated with the repository. 3050 PolicyText *string `locationName:"policyText" type:"string"` 3051 3052 // The registry ID associated with the request. 3053 RegistryId *string `locationName:"registryId" type:"string"` 3054 3055 // The repository name associated with the request. 3056 RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"` 3057} 3058 3059// String returns the string representation 3060func (s GetRepositoryPolicyOutput) String() string { 3061 return awsutil.Prettify(s) 3062} 3063 3064// GoString returns the string representation 3065func (s GetRepositoryPolicyOutput) GoString() string { 3066 return s.String() 3067} 3068 3069// SetPolicyText sets the PolicyText field's value. 3070func (s *GetRepositoryPolicyOutput) SetPolicyText(v string) *GetRepositoryPolicyOutput { 3071 s.PolicyText = &v 3072 return s 3073} 3074 3075// SetRegistryId sets the RegistryId field's value. 3076func (s *GetRepositoryPolicyOutput) SetRegistryId(v string) *GetRepositoryPolicyOutput { 3077 s.RegistryId = &v 3078 return s 3079} 3080 3081// SetRepositoryName sets the RepositoryName field's value. 3082func (s *GetRepositoryPolicyOutput) SetRepositoryName(v string) *GetRepositoryPolicyOutput { 3083 s.RepositoryName = &v 3084 return s 3085} 3086 3087// An object representing an Amazon ECR image. 3088// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/Image 3089type Image struct { 3090 _ struct{} `type:"structure"` 3091 3092 // An object containing the image tag and image digest associated with an image. 3093 ImageId *ImageIdentifier `locationName:"imageId" type:"structure"` 3094 3095 // The image manifest associated with the image. 3096 ImageManifest *string `locationName:"imageManifest" type:"string"` 3097 3098 // The AWS account ID associated with the registry containing the image. 3099 RegistryId *string `locationName:"registryId" type:"string"` 3100 3101 // The name of the repository associated with the image. 3102 RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"` 3103} 3104 3105// String returns the string representation 3106func (s Image) String() string { 3107 return awsutil.Prettify(s) 3108} 3109 3110// GoString returns the string representation 3111func (s Image) GoString() string { 3112 return s.String() 3113} 3114 3115// SetImageId sets the ImageId field's value. 3116func (s *Image) SetImageId(v *ImageIdentifier) *Image { 3117 s.ImageId = v 3118 return s 3119} 3120 3121// SetImageManifest sets the ImageManifest field's value. 3122func (s *Image) SetImageManifest(v string) *Image { 3123 s.ImageManifest = &v 3124 return s 3125} 3126 3127// SetRegistryId sets the RegistryId field's value. 3128func (s *Image) SetRegistryId(v string) *Image { 3129 s.RegistryId = &v 3130 return s 3131} 3132 3133// SetRepositoryName sets the RepositoryName field's value. 3134func (s *Image) SetRepositoryName(v string) *Image { 3135 s.RepositoryName = &v 3136 return s 3137} 3138 3139// An object that describes an image returned by a DescribeImages operation. 3140// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ImageDetail 3141type ImageDetail struct { 3142 _ struct{} `type:"structure"` 3143 3144 // The sha256 digest of the image manifest. 3145 ImageDigest *string `locationName:"imageDigest" type:"string"` 3146 3147 // The date and time, expressed in standard JavaScript date format, at which 3148 // the current image was pushed to the repository. 3149 ImagePushedAt *time.Time `locationName:"imagePushedAt" type:"timestamp" timestampFormat:"unix"` 3150 3151 // The size, in bytes, of the image in the repository. 3152 // 3153 // Beginning with Docker version 1.9, the Docker client compresses image layers 3154 // before pushing them to a V2 Docker registry. The output of the docker images 3155 // command shows the uncompressed image size, so it may return a larger image 3156 // size than the image sizes returned by DescribeImages. 3157 ImageSizeInBytes *int64 `locationName:"imageSizeInBytes" type:"long"` 3158 3159 // The list of tags associated with this image. 3160 ImageTags []*string `locationName:"imageTags" type:"list"` 3161 3162 // The AWS account ID associated with the registry to which this image belongs. 3163 RegistryId *string `locationName:"registryId" type:"string"` 3164 3165 // The name of the repository to which this image belongs. 3166 RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"` 3167} 3168 3169// String returns the string representation 3170func (s ImageDetail) String() string { 3171 return awsutil.Prettify(s) 3172} 3173 3174// GoString returns the string representation 3175func (s ImageDetail) GoString() string { 3176 return s.String() 3177} 3178 3179// SetImageDigest sets the ImageDigest field's value. 3180func (s *ImageDetail) SetImageDigest(v string) *ImageDetail { 3181 s.ImageDigest = &v 3182 return s 3183} 3184 3185// SetImagePushedAt sets the ImagePushedAt field's value. 3186func (s *ImageDetail) SetImagePushedAt(v time.Time) *ImageDetail { 3187 s.ImagePushedAt = &v 3188 return s 3189} 3190 3191// SetImageSizeInBytes sets the ImageSizeInBytes field's value. 3192func (s *ImageDetail) SetImageSizeInBytes(v int64) *ImageDetail { 3193 s.ImageSizeInBytes = &v 3194 return s 3195} 3196 3197// SetImageTags sets the ImageTags field's value. 3198func (s *ImageDetail) SetImageTags(v []*string) *ImageDetail { 3199 s.ImageTags = v 3200 return s 3201} 3202 3203// SetRegistryId sets the RegistryId field's value. 3204func (s *ImageDetail) SetRegistryId(v string) *ImageDetail { 3205 s.RegistryId = &v 3206 return s 3207} 3208 3209// SetRepositoryName sets the RepositoryName field's value. 3210func (s *ImageDetail) SetRepositoryName(v string) *ImageDetail { 3211 s.RepositoryName = &v 3212 return s 3213} 3214 3215// An object representing an Amazon ECR image failure. 3216// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ImageFailure 3217type ImageFailure struct { 3218 _ struct{} `type:"structure"` 3219 3220 // The code associated with the failure. 3221 FailureCode *string `locationName:"failureCode" type:"string" enum:"ImageFailureCode"` 3222 3223 // The reason for the failure. 3224 FailureReason *string `locationName:"failureReason" type:"string"` 3225 3226 // The image ID associated with the failure. 3227 ImageId *ImageIdentifier `locationName:"imageId" type:"structure"` 3228} 3229 3230// String returns the string representation 3231func (s ImageFailure) String() string { 3232 return awsutil.Prettify(s) 3233} 3234 3235// GoString returns the string representation 3236func (s ImageFailure) GoString() string { 3237 return s.String() 3238} 3239 3240// SetFailureCode sets the FailureCode field's value. 3241func (s *ImageFailure) SetFailureCode(v string) *ImageFailure { 3242 s.FailureCode = &v 3243 return s 3244} 3245 3246// SetFailureReason sets the FailureReason field's value. 3247func (s *ImageFailure) SetFailureReason(v string) *ImageFailure { 3248 s.FailureReason = &v 3249 return s 3250} 3251 3252// SetImageId sets the ImageId field's value. 3253func (s *ImageFailure) SetImageId(v *ImageIdentifier) *ImageFailure { 3254 s.ImageId = v 3255 return s 3256} 3257 3258// An object with identifying information for an Amazon ECR image. 3259// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ImageIdentifier 3260type ImageIdentifier struct { 3261 _ struct{} `type:"structure"` 3262 3263 // The sha256 digest of the image manifest. 3264 ImageDigest *string `locationName:"imageDigest" type:"string"` 3265 3266 // The tag used for the image. 3267 ImageTag *string `locationName:"imageTag" type:"string"` 3268} 3269 3270// String returns the string representation 3271func (s ImageIdentifier) String() string { 3272 return awsutil.Prettify(s) 3273} 3274 3275// GoString returns the string representation 3276func (s ImageIdentifier) GoString() string { 3277 return s.String() 3278} 3279 3280// SetImageDigest sets the ImageDigest field's value. 3281func (s *ImageIdentifier) SetImageDigest(v string) *ImageIdentifier { 3282 s.ImageDigest = &v 3283 return s 3284} 3285 3286// SetImageTag sets the ImageTag field's value. 3287func (s *ImageIdentifier) SetImageTag(v string) *ImageIdentifier { 3288 s.ImageTag = &v 3289 return s 3290} 3291 3292// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/InitiateLayerUploadRequest 3293type InitiateLayerUploadInput struct { 3294 _ struct{} `type:"structure"` 3295 3296 // The AWS account ID associated with the registry that you intend to upload 3297 // layers to. If you do not specify a registry, the default registry is assumed. 3298 RegistryId *string `locationName:"registryId" type:"string"` 3299 3300 // The name of the repository that you intend to upload layers to. 3301 // 3302 // RepositoryName is a required field 3303 RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"` 3304} 3305 3306// String returns the string representation 3307func (s InitiateLayerUploadInput) String() string { 3308 return awsutil.Prettify(s) 3309} 3310 3311// GoString returns the string representation 3312func (s InitiateLayerUploadInput) GoString() string { 3313 return s.String() 3314} 3315 3316// Validate inspects the fields of the type to determine if they are valid. 3317func (s *InitiateLayerUploadInput) Validate() error { 3318 invalidParams := request.ErrInvalidParams{Context: "InitiateLayerUploadInput"} 3319 if s.RepositoryName == nil { 3320 invalidParams.Add(request.NewErrParamRequired("RepositoryName")) 3321 } 3322 if s.RepositoryName != nil && len(*s.RepositoryName) < 2 { 3323 invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2)) 3324 } 3325 3326 if invalidParams.Len() > 0 { 3327 return invalidParams 3328 } 3329 return nil 3330} 3331 3332// SetRegistryId sets the RegistryId field's value. 3333func (s *InitiateLayerUploadInput) SetRegistryId(v string) *InitiateLayerUploadInput { 3334 s.RegistryId = &v 3335 return s 3336} 3337 3338// SetRepositoryName sets the RepositoryName field's value. 3339func (s *InitiateLayerUploadInput) SetRepositoryName(v string) *InitiateLayerUploadInput { 3340 s.RepositoryName = &v 3341 return s 3342} 3343 3344// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/InitiateLayerUploadResponse 3345type InitiateLayerUploadOutput struct { 3346 _ struct{} `type:"structure"` 3347 3348 // The size, in bytes, that Amazon ECR expects future layer part uploads to 3349 // be. 3350 PartSize *int64 `locationName:"partSize" type:"long"` 3351 3352 // The upload ID for the layer upload. This parameter is passed to further UploadLayerPart 3353 // and CompleteLayerUpload operations. 3354 UploadId *string `locationName:"uploadId" type:"string"` 3355} 3356 3357// String returns the string representation 3358func (s InitiateLayerUploadOutput) String() string { 3359 return awsutil.Prettify(s) 3360} 3361 3362// GoString returns the string representation 3363func (s InitiateLayerUploadOutput) GoString() string { 3364 return s.String() 3365} 3366 3367// SetPartSize sets the PartSize field's value. 3368func (s *InitiateLayerUploadOutput) SetPartSize(v int64) *InitiateLayerUploadOutput { 3369 s.PartSize = &v 3370 return s 3371} 3372 3373// SetUploadId sets the UploadId field's value. 3374func (s *InitiateLayerUploadOutput) SetUploadId(v string) *InitiateLayerUploadOutput { 3375 s.UploadId = &v 3376 return s 3377} 3378 3379// An object representing an Amazon ECR image layer. 3380// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/Layer 3381type Layer struct { 3382 _ struct{} `type:"structure"` 3383 3384 // The availability status of the image layer. 3385 LayerAvailability *string `locationName:"layerAvailability" type:"string" enum:"LayerAvailability"` 3386 3387 // The sha256 digest of the image layer. 3388 LayerDigest *string `locationName:"layerDigest" type:"string"` 3389 3390 // The size, in bytes, of the image layer. 3391 LayerSize *int64 `locationName:"layerSize" type:"long"` 3392 3393 // The media type of the layer, such as application/vnd.docker.image.rootfs.diff.tar.gzip 3394 // or application/vnd.oci.image.layer.v1.tar+gzip. 3395 MediaType *string `locationName:"mediaType" type:"string"` 3396} 3397 3398// String returns the string representation 3399func (s Layer) String() string { 3400 return awsutil.Prettify(s) 3401} 3402 3403// GoString returns the string representation 3404func (s Layer) GoString() string { 3405 return s.String() 3406} 3407 3408// SetLayerAvailability sets the LayerAvailability field's value. 3409func (s *Layer) SetLayerAvailability(v string) *Layer { 3410 s.LayerAvailability = &v 3411 return s 3412} 3413 3414// SetLayerDigest sets the LayerDigest field's value. 3415func (s *Layer) SetLayerDigest(v string) *Layer { 3416 s.LayerDigest = &v 3417 return s 3418} 3419 3420// SetLayerSize sets the LayerSize field's value. 3421func (s *Layer) SetLayerSize(v int64) *Layer { 3422 s.LayerSize = &v 3423 return s 3424} 3425 3426// SetMediaType sets the MediaType field's value. 3427func (s *Layer) SetMediaType(v string) *Layer { 3428 s.MediaType = &v 3429 return s 3430} 3431 3432// An object representing an Amazon ECR image layer failure. 3433// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/LayerFailure 3434type LayerFailure struct { 3435 _ struct{} `type:"structure"` 3436 3437 // The failure code associated with the failure. 3438 FailureCode *string `locationName:"failureCode" type:"string" enum:"LayerFailureCode"` 3439 3440 // The reason for the failure. 3441 FailureReason *string `locationName:"failureReason" type:"string"` 3442 3443 // The layer digest associated with the failure. 3444 LayerDigest *string `locationName:"layerDigest" type:"string"` 3445} 3446 3447// String returns the string representation 3448func (s LayerFailure) String() string { 3449 return awsutil.Prettify(s) 3450} 3451 3452// GoString returns the string representation 3453func (s LayerFailure) GoString() string { 3454 return s.String() 3455} 3456 3457// SetFailureCode sets the FailureCode field's value. 3458func (s *LayerFailure) SetFailureCode(v string) *LayerFailure { 3459 s.FailureCode = &v 3460 return s 3461} 3462 3463// SetFailureReason sets the FailureReason field's value. 3464func (s *LayerFailure) SetFailureReason(v string) *LayerFailure { 3465 s.FailureReason = &v 3466 return s 3467} 3468 3469// SetLayerDigest sets the LayerDigest field's value. 3470func (s *LayerFailure) SetLayerDigest(v string) *LayerFailure { 3471 s.LayerDigest = &v 3472 return s 3473} 3474 3475// An object representing a filter on a ListImages operation. 3476// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ListImagesFilter 3477type ListImagesFilter struct { 3478 _ struct{} `type:"structure"` 3479 3480 // The tag status with which to filter your ListImages results. You can filter 3481 // results based on whether they are TAGGED or UNTAGGED. 3482 TagStatus *string `locationName:"tagStatus" type:"string" enum:"TagStatus"` 3483} 3484 3485// String returns the string representation 3486func (s ListImagesFilter) String() string { 3487 return awsutil.Prettify(s) 3488} 3489 3490// GoString returns the string representation 3491func (s ListImagesFilter) GoString() string { 3492 return s.String() 3493} 3494 3495// SetTagStatus sets the TagStatus field's value. 3496func (s *ListImagesFilter) SetTagStatus(v string) *ListImagesFilter { 3497 s.TagStatus = &v 3498 return s 3499} 3500 3501// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ListImagesRequest 3502type ListImagesInput struct { 3503 _ struct{} `type:"structure"` 3504 3505 // The filter key and value with which to filter your ListImages results. 3506 Filter *ListImagesFilter `locationName:"filter" type:"structure"` 3507 3508 // The maximum number of image results returned by ListImages in paginated output. 3509 // When this parameter is used, ListImages only returns maxResults results in 3510 // a single page along with a nextToken response element. The remaining results 3511 // of the initial request can be seen by sending another ListImages request 3512 // with the returned nextToken value. This value can be between 1 and 100. If 3513 // this parameter is not used, then ListImages returns up to 100 results and 3514 // a nextToken value, if applicable. 3515 MaxResults *int64 `locationName:"maxResults" min:"1" type:"integer"` 3516 3517 // The nextToken value returned from a previous paginated ListImages request 3518 // where maxResults was used and the results exceeded the value of that parameter. 3519 // Pagination continues from the end of the previous results that returned the 3520 // nextToken value. This value is null when there are no more results to return. 3521 // 3522 // This token should be treated as an opaque identifier that is only used to 3523 // retrieve the next items in a list and not for other programmatic purposes. 3524 NextToken *string `locationName:"nextToken" type:"string"` 3525 3526 // The AWS account ID associated with the registry that contains the repository 3527 // to list images in. If you do not specify a registry, the default registry 3528 // is assumed. 3529 RegistryId *string `locationName:"registryId" type:"string"` 3530 3531 // The repository whose image IDs are to be listed. 3532 // 3533 // RepositoryName is a required field 3534 RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"` 3535} 3536 3537// String returns the string representation 3538func (s ListImagesInput) String() string { 3539 return awsutil.Prettify(s) 3540} 3541 3542// GoString returns the string representation 3543func (s ListImagesInput) GoString() string { 3544 return s.String() 3545} 3546 3547// Validate inspects the fields of the type to determine if they are valid. 3548func (s *ListImagesInput) Validate() error { 3549 invalidParams := request.ErrInvalidParams{Context: "ListImagesInput"} 3550 if s.MaxResults != nil && *s.MaxResults < 1 { 3551 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 3552 } 3553 if s.RepositoryName == nil { 3554 invalidParams.Add(request.NewErrParamRequired("RepositoryName")) 3555 } 3556 if s.RepositoryName != nil && len(*s.RepositoryName) < 2 { 3557 invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2)) 3558 } 3559 3560 if invalidParams.Len() > 0 { 3561 return invalidParams 3562 } 3563 return nil 3564} 3565 3566// SetFilter sets the Filter field's value. 3567func (s *ListImagesInput) SetFilter(v *ListImagesFilter) *ListImagesInput { 3568 s.Filter = v 3569 return s 3570} 3571 3572// SetMaxResults sets the MaxResults field's value. 3573func (s *ListImagesInput) SetMaxResults(v int64) *ListImagesInput { 3574 s.MaxResults = &v 3575 return s 3576} 3577 3578// SetNextToken sets the NextToken field's value. 3579func (s *ListImagesInput) SetNextToken(v string) *ListImagesInput { 3580 s.NextToken = &v 3581 return s 3582} 3583 3584// SetRegistryId sets the RegistryId field's value. 3585func (s *ListImagesInput) SetRegistryId(v string) *ListImagesInput { 3586 s.RegistryId = &v 3587 return s 3588} 3589 3590// SetRepositoryName sets the RepositoryName field's value. 3591func (s *ListImagesInput) SetRepositoryName(v string) *ListImagesInput { 3592 s.RepositoryName = &v 3593 return s 3594} 3595 3596// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ListImagesResponse 3597type ListImagesOutput struct { 3598 _ struct{} `type:"structure"` 3599 3600 // The list of image IDs for the requested repository. 3601 ImageIds []*ImageIdentifier `locationName:"imageIds" min:"1" type:"list"` 3602 3603 // The nextToken value to include in a future ListImages request. When the results 3604 // of a ListImages request exceed maxResults, this value can be used to retrieve 3605 // the next page of results. This value is null when there are no more results 3606 // to return. 3607 NextToken *string `locationName:"nextToken" type:"string"` 3608} 3609 3610// String returns the string representation 3611func (s ListImagesOutput) String() string { 3612 return awsutil.Prettify(s) 3613} 3614 3615// GoString returns the string representation 3616func (s ListImagesOutput) GoString() string { 3617 return s.String() 3618} 3619 3620// SetImageIds sets the ImageIds field's value. 3621func (s *ListImagesOutput) SetImageIds(v []*ImageIdentifier) *ListImagesOutput { 3622 s.ImageIds = v 3623 return s 3624} 3625 3626// SetNextToken sets the NextToken field's value. 3627func (s *ListImagesOutput) SetNextToken(v string) *ListImagesOutput { 3628 s.NextToken = &v 3629 return s 3630} 3631 3632// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PutImageRequest 3633type PutImageInput struct { 3634 _ struct{} `type:"structure"` 3635 3636 // The image manifest corresponding to the image to be uploaded. 3637 // 3638 // ImageManifest is a required field 3639 ImageManifest *string `locationName:"imageManifest" type:"string" required:"true"` 3640 3641 // The tag to associate with the image. This parameter is required for images 3642 // that use the Docker Image Manifest V2 Schema 2 or OCI formats. 3643 ImageTag *string `locationName:"imageTag" type:"string"` 3644 3645 // The AWS account ID associated with the registry that contains the repository 3646 // in which to put the image. If you do not specify a registry, the default 3647 // registry is assumed. 3648 RegistryId *string `locationName:"registryId" type:"string"` 3649 3650 // The name of the repository in which to put the image. 3651 // 3652 // RepositoryName is a required field 3653 RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"` 3654} 3655 3656// String returns the string representation 3657func (s PutImageInput) String() string { 3658 return awsutil.Prettify(s) 3659} 3660 3661// GoString returns the string representation 3662func (s PutImageInput) GoString() string { 3663 return s.String() 3664} 3665 3666// Validate inspects the fields of the type to determine if they are valid. 3667func (s *PutImageInput) Validate() error { 3668 invalidParams := request.ErrInvalidParams{Context: "PutImageInput"} 3669 if s.ImageManifest == nil { 3670 invalidParams.Add(request.NewErrParamRequired("ImageManifest")) 3671 } 3672 if s.RepositoryName == nil { 3673 invalidParams.Add(request.NewErrParamRequired("RepositoryName")) 3674 } 3675 if s.RepositoryName != nil && len(*s.RepositoryName) < 2 { 3676 invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2)) 3677 } 3678 3679 if invalidParams.Len() > 0 { 3680 return invalidParams 3681 } 3682 return nil 3683} 3684 3685// SetImageManifest sets the ImageManifest field's value. 3686func (s *PutImageInput) SetImageManifest(v string) *PutImageInput { 3687 s.ImageManifest = &v 3688 return s 3689} 3690 3691// SetImageTag sets the ImageTag field's value. 3692func (s *PutImageInput) SetImageTag(v string) *PutImageInput { 3693 s.ImageTag = &v 3694 return s 3695} 3696 3697// SetRegistryId sets the RegistryId field's value. 3698func (s *PutImageInput) SetRegistryId(v string) *PutImageInput { 3699 s.RegistryId = &v 3700 return s 3701} 3702 3703// SetRepositoryName sets the RepositoryName field's value. 3704func (s *PutImageInput) SetRepositoryName(v string) *PutImageInput { 3705 s.RepositoryName = &v 3706 return s 3707} 3708 3709// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PutImageResponse 3710type PutImageOutput struct { 3711 _ struct{} `type:"structure"` 3712 3713 // Details of the image uploaded. 3714 Image *Image `locationName:"image" type:"structure"` 3715} 3716 3717// String returns the string representation 3718func (s PutImageOutput) String() string { 3719 return awsutil.Prettify(s) 3720} 3721 3722// GoString returns the string representation 3723func (s PutImageOutput) GoString() string { 3724 return s.String() 3725} 3726 3727// SetImage sets the Image field's value. 3728func (s *PutImageOutput) SetImage(v *Image) *PutImageOutput { 3729 s.Image = v 3730 return s 3731} 3732 3733// An object representing a repository. 3734// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/Repository 3735type Repository struct { 3736 _ struct{} `type:"structure"` 3737 3738 // The date and time, in JavaScript date/time format, when the repository was 3739 // created. 3740 CreatedAt *time.Time `locationName:"createdAt" type:"timestamp" timestampFormat:"unix"` 3741 3742 // The AWS account ID associated with the registry that contains the repository. 3743 RegistryId *string `locationName:"registryId" type:"string"` 3744 3745 // The Amazon Resource Name (ARN) that identifies the repository. The ARN contains 3746 // the arn:aws:ecr namespace, followed by the region of the repository, the 3747 // AWS account ID of the repository owner, the repository namespace, and then 3748 // the repository name. For example, arn:aws:ecr:region:012345678910:repository/test. 3749 RepositoryArn *string `locationName:"repositoryArn" type:"string"` 3750 3751 // The name of the repository. 3752 RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"` 3753 3754 // The URI for the repository. You can use this URI for Docker push and pull 3755 // operations. 3756 RepositoryUri *string `locationName:"repositoryUri" type:"string"` 3757} 3758 3759// String returns the string representation 3760func (s Repository) String() string { 3761 return awsutil.Prettify(s) 3762} 3763 3764// GoString returns the string representation 3765func (s Repository) GoString() string { 3766 return s.String() 3767} 3768 3769// SetCreatedAt sets the CreatedAt field's value. 3770func (s *Repository) SetCreatedAt(v time.Time) *Repository { 3771 s.CreatedAt = &v 3772 return s 3773} 3774 3775// SetRegistryId sets the RegistryId field's value. 3776func (s *Repository) SetRegistryId(v string) *Repository { 3777 s.RegistryId = &v 3778 return s 3779} 3780 3781// SetRepositoryArn sets the RepositoryArn field's value. 3782func (s *Repository) SetRepositoryArn(v string) *Repository { 3783 s.RepositoryArn = &v 3784 return s 3785} 3786 3787// SetRepositoryName sets the RepositoryName field's value. 3788func (s *Repository) SetRepositoryName(v string) *Repository { 3789 s.RepositoryName = &v 3790 return s 3791} 3792 3793// SetRepositoryUri sets the RepositoryUri field's value. 3794func (s *Repository) SetRepositoryUri(v string) *Repository { 3795 s.RepositoryUri = &v 3796 return s 3797} 3798 3799// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/SetRepositoryPolicyRequest 3800type SetRepositoryPolicyInput struct { 3801 _ struct{} `type:"structure"` 3802 3803 // If the policy you are attempting to set on a repository policy would prevent 3804 // you from setting another policy in the future, you must force the SetRepositoryPolicy 3805 // operation. This is intended to prevent accidental repository lock outs. 3806 Force *bool `locationName:"force" type:"boolean"` 3807 3808 // The JSON repository policy text to apply to the repository. 3809 // 3810 // PolicyText is a required field 3811 PolicyText *string `locationName:"policyText" type:"string" required:"true"` 3812 3813 // The AWS account ID associated with the registry that contains the repository. 3814 // If you do not specify a registry, the default registry is assumed. 3815 RegistryId *string `locationName:"registryId" type:"string"` 3816 3817 // The name of the repository to receive the policy. 3818 // 3819 // RepositoryName is a required field 3820 RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"` 3821} 3822 3823// String returns the string representation 3824func (s SetRepositoryPolicyInput) String() string { 3825 return awsutil.Prettify(s) 3826} 3827 3828// GoString returns the string representation 3829func (s SetRepositoryPolicyInput) GoString() string { 3830 return s.String() 3831} 3832 3833// Validate inspects the fields of the type to determine if they are valid. 3834func (s *SetRepositoryPolicyInput) Validate() error { 3835 invalidParams := request.ErrInvalidParams{Context: "SetRepositoryPolicyInput"} 3836 if s.PolicyText == nil { 3837 invalidParams.Add(request.NewErrParamRequired("PolicyText")) 3838 } 3839 if s.RepositoryName == nil { 3840 invalidParams.Add(request.NewErrParamRequired("RepositoryName")) 3841 } 3842 if s.RepositoryName != nil && len(*s.RepositoryName) < 2 { 3843 invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2)) 3844 } 3845 3846 if invalidParams.Len() > 0 { 3847 return invalidParams 3848 } 3849 return nil 3850} 3851 3852// SetForce sets the Force field's value. 3853func (s *SetRepositoryPolicyInput) SetForce(v bool) *SetRepositoryPolicyInput { 3854 s.Force = &v 3855 return s 3856} 3857 3858// SetPolicyText sets the PolicyText field's value. 3859func (s *SetRepositoryPolicyInput) SetPolicyText(v string) *SetRepositoryPolicyInput { 3860 s.PolicyText = &v 3861 return s 3862} 3863 3864// SetRegistryId sets the RegistryId field's value. 3865func (s *SetRepositoryPolicyInput) SetRegistryId(v string) *SetRepositoryPolicyInput { 3866 s.RegistryId = &v 3867 return s 3868} 3869 3870// SetRepositoryName sets the RepositoryName field's value. 3871func (s *SetRepositoryPolicyInput) SetRepositoryName(v string) *SetRepositoryPolicyInput { 3872 s.RepositoryName = &v 3873 return s 3874} 3875 3876// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/SetRepositoryPolicyResponse 3877type SetRepositoryPolicyOutput struct { 3878 _ struct{} `type:"structure"` 3879 3880 // The JSON repository policy text applied to the repository. 3881 PolicyText *string `locationName:"policyText" type:"string"` 3882 3883 // The registry ID associated with the request. 3884 RegistryId *string `locationName:"registryId" type:"string"` 3885 3886 // The repository name associated with the request. 3887 RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"` 3888} 3889 3890// String returns the string representation 3891func (s SetRepositoryPolicyOutput) String() string { 3892 return awsutil.Prettify(s) 3893} 3894 3895// GoString returns the string representation 3896func (s SetRepositoryPolicyOutput) GoString() string { 3897 return s.String() 3898} 3899 3900// SetPolicyText sets the PolicyText field's value. 3901func (s *SetRepositoryPolicyOutput) SetPolicyText(v string) *SetRepositoryPolicyOutput { 3902 s.PolicyText = &v 3903 return s 3904} 3905 3906// SetRegistryId sets the RegistryId field's value. 3907func (s *SetRepositoryPolicyOutput) SetRegistryId(v string) *SetRepositoryPolicyOutput { 3908 s.RegistryId = &v 3909 return s 3910} 3911 3912// SetRepositoryName sets the RepositoryName field's value. 3913func (s *SetRepositoryPolicyOutput) SetRepositoryName(v string) *SetRepositoryPolicyOutput { 3914 s.RepositoryName = &v 3915 return s 3916} 3917 3918// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/UploadLayerPartRequest 3919type UploadLayerPartInput struct { 3920 _ struct{} `type:"structure"` 3921 3922 // The base64-encoded layer part payload. 3923 // 3924 // LayerPartBlob is automatically base64 encoded/decoded by the SDK. 3925 // 3926 // LayerPartBlob is a required field 3927 LayerPartBlob []byte `locationName:"layerPartBlob" type:"blob" required:"true"` 3928 3929 // The integer value of the first byte of the layer part. 3930 // 3931 // PartFirstByte is a required field 3932 PartFirstByte *int64 `locationName:"partFirstByte" type:"long" required:"true"` 3933 3934 // The integer value of the last byte of the layer part. 3935 // 3936 // PartLastByte is a required field 3937 PartLastByte *int64 `locationName:"partLastByte" type:"long" required:"true"` 3938 3939 // The AWS account ID associated with the registry that you are uploading layer 3940 // parts to. If you do not specify a registry, the default registry is assumed. 3941 RegistryId *string `locationName:"registryId" type:"string"` 3942 3943 // The name of the repository that you are uploading layer parts to. 3944 // 3945 // RepositoryName is a required field 3946 RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"` 3947 3948 // The upload ID from a previous InitiateLayerUpload operation to associate 3949 // with the layer part upload. 3950 // 3951 // UploadId is a required field 3952 UploadId *string `locationName:"uploadId" type:"string" required:"true"` 3953} 3954 3955// String returns the string representation 3956func (s UploadLayerPartInput) String() string { 3957 return awsutil.Prettify(s) 3958} 3959 3960// GoString returns the string representation 3961func (s UploadLayerPartInput) GoString() string { 3962 return s.String() 3963} 3964 3965// Validate inspects the fields of the type to determine if they are valid. 3966func (s *UploadLayerPartInput) Validate() error { 3967 invalidParams := request.ErrInvalidParams{Context: "UploadLayerPartInput"} 3968 if s.LayerPartBlob == nil { 3969 invalidParams.Add(request.NewErrParamRequired("LayerPartBlob")) 3970 } 3971 if s.PartFirstByte == nil { 3972 invalidParams.Add(request.NewErrParamRequired("PartFirstByte")) 3973 } 3974 if s.PartLastByte == nil { 3975 invalidParams.Add(request.NewErrParamRequired("PartLastByte")) 3976 } 3977 if s.RepositoryName == nil { 3978 invalidParams.Add(request.NewErrParamRequired("RepositoryName")) 3979 } 3980 if s.RepositoryName != nil && len(*s.RepositoryName) < 2 { 3981 invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2)) 3982 } 3983 if s.UploadId == nil { 3984 invalidParams.Add(request.NewErrParamRequired("UploadId")) 3985 } 3986 3987 if invalidParams.Len() > 0 { 3988 return invalidParams 3989 } 3990 return nil 3991} 3992 3993// SetLayerPartBlob sets the LayerPartBlob field's value. 3994func (s *UploadLayerPartInput) SetLayerPartBlob(v []byte) *UploadLayerPartInput { 3995 s.LayerPartBlob = v 3996 return s 3997} 3998 3999// SetPartFirstByte sets the PartFirstByte field's value. 4000func (s *UploadLayerPartInput) SetPartFirstByte(v int64) *UploadLayerPartInput { 4001 s.PartFirstByte = &v 4002 return s 4003} 4004 4005// SetPartLastByte sets the PartLastByte field's value. 4006func (s *UploadLayerPartInput) SetPartLastByte(v int64) *UploadLayerPartInput { 4007 s.PartLastByte = &v 4008 return s 4009} 4010 4011// SetRegistryId sets the RegistryId field's value. 4012func (s *UploadLayerPartInput) SetRegistryId(v string) *UploadLayerPartInput { 4013 s.RegistryId = &v 4014 return s 4015} 4016 4017// SetRepositoryName sets the RepositoryName field's value. 4018func (s *UploadLayerPartInput) SetRepositoryName(v string) *UploadLayerPartInput { 4019 s.RepositoryName = &v 4020 return s 4021} 4022 4023// SetUploadId sets the UploadId field's value. 4024func (s *UploadLayerPartInput) SetUploadId(v string) *UploadLayerPartInput { 4025 s.UploadId = &v 4026 return s 4027} 4028 4029// Please also see https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/UploadLayerPartResponse 4030type UploadLayerPartOutput struct { 4031 _ struct{} `type:"structure"` 4032 4033 // The integer value of the last byte received in the request. 4034 LastByteReceived *int64 `locationName:"lastByteReceived" type:"long"` 4035 4036 // The registry ID associated with the request. 4037 RegistryId *string `locationName:"registryId" type:"string"` 4038 4039 // The repository name associated with the request. 4040 RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"` 4041 4042 // The upload ID associated with the request. 4043 UploadId *string `locationName:"uploadId" type:"string"` 4044} 4045 4046// String returns the string representation 4047func (s UploadLayerPartOutput) String() string { 4048 return awsutil.Prettify(s) 4049} 4050 4051// GoString returns the string representation 4052func (s UploadLayerPartOutput) GoString() string { 4053 return s.String() 4054} 4055 4056// SetLastByteReceived sets the LastByteReceived field's value. 4057func (s *UploadLayerPartOutput) SetLastByteReceived(v int64) *UploadLayerPartOutput { 4058 s.LastByteReceived = &v 4059 return s 4060} 4061 4062// SetRegistryId sets the RegistryId field's value. 4063func (s *UploadLayerPartOutput) SetRegistryId(v string) *UploadLayerPartOutput { 4064 s.RegistryId = &v 4065 return s 4066} 4067 4068// SetRepositoryName sets the RepositoryName field's value. 4069func (s *UploadLayerPartOutput) SetRepositoryName(v string) *UploadLayerPartOutput { 4070 s.RepositoryName = &v 4071 return s 4072} 4073 4074// SetUploadId sets the UploadId field's value. 4075func (s *UploadLayerPartOutput) SetUploadId(v string) *UploadLayerPartOutput { 4076 s.UploadId = &v 4077 return s 4078} 4079 4080const ( 4081 // ImageFailureCodeInvalidImageDigest is a ImageFailureCode enum value 4082 ImageFailureCodeInvalidImageDigest = "InvalidImageDigest" 4083 4084 // ImageFailureCodeInvalidImageTag is a ImageFailureCode enum value 4085 ImageFailureCodeInvalidImageTag = "InvalidImageTag" 4086 4087 // ImageFailureCodeImageTagDoesNotMatchDigest is a ImageFailureCode enum value 4088 ImageFailureCodeImageTagDoesNotMatchDigest = "ImageTagDoesNotMatchDigest" 4089 4090 // ImageFailureCodeImageNotFound is a ImageFailureCode enum value 4091 ImageFailureCodeImageNotFound = "ImageNotFound" 4092 4093 // ImageFailureCodeMissingDigestAndTag is a ImageFailureCode enum value 4094 ImageFailureCodeMissingDigestAndTag = "MissingDigestAndTag" 4095) 4096 4097const ( 4098 // LayerAvailabilityAvailable is a LayerAvailability enum value 4099 LayerAvailabilityAvailable = "AVAILABLE" 4100 4101 // LayerAvailabilityUnavailable is a LayerAvailability enum value 4102 LayerAvailabilityUnavailable = "UNAVAILABLE" 4103) 4104 4105const ( 4106 // LayerFailureCodeInvalidLayerDigest is a LayerFailureCode enum value 4107 LayerFailureCodeInvalidLayerDigest = "InvalidLayerDigest" 4108 4109 // LayerFailureCodeMissingLayerDigest is a LayerFailureCode enum value 4110 LayerFailureCodeMissingLayerDigest = "MissingLayerDigest" 4111) 4112 4113const ( 4114 // TagStatusTagged is a TagStatus enum value 4115 TagStatusTagged = "TAGGED" 4116 4117 // TagStatusUntagged is a TagStatus enum value 4118 TagStatusUntagged = "UNTAGGED" 4119) 4120