Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
awssdkgo Release v1.21.5 079c291 Jul 25, 2019
2 contributors

Users who have contributed to this file

@jasdel @xibz
6128 lines (5307 sloc) 215 KB
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package ecr
import (
"fmt"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/awsutil"
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/private/protocol"
"github.com/aws/aws-sdk-go/private/protocol/jsonrpc"
)
const opBatchCheckLayerAvailability = "BatchCheckLayerAvailability"
// BatchCheckLayerAvailabilityRequest generates a "aws/request.Request" representing the
// client's request for the BatchCheckLayerAvailability operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See BatchCheckLayerAvailability for more information on using the BatchCheckLayerAvailability
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the BatchCheckLayerAvailabilityRequest method.
// req, resp := client.BatchCheckLayerAvailabilityRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/BatchCheckLayerAvailability
func (c *ECR) BatchCheckLayerAvailabilityRequest(input *BatchCheckLayerAvailabilityInput) (req *request.Request, output *BatchCheckLayerAvailabilityOutput) {
op := &request.Operation{
Name: opBatchCheckLayerAvailability,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &BatchCheckLayerAvailabilityInput{}
}
output = &BatchCheckLayerAvailabilityOutput{}
req = c.newRequest(op, input, output)
return
}
// BatchCheckLayerAvailability API operation for Amazon EC2 Container Registry.
//
// Check the availability of multiple image layers in a specified registry and
// repository.
//
// This operation is used by the Amazon ECR proxy, and it is not intended for
// general use by customers for pulling and pushing images. In most cases, you
// should use the docker CLI to pull, tag, and push images.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon EC2 Container Registry's
// API operation BatchCheckLayerAvailability for usage and error information.
//
// Returned Error Codes:
// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException"
// The specified repository could not be found. Check the spelling of the specified
// repository and ensure that you are performing operations on the correct registry.
//
// * ErrCodeInvalidParameterException "InvalidParameterException"
// The specified parameter is invalid. Review the available parameters for the
// API request.
//
// * ErrCodeServerException "ServerException"
// These errors are usually caused by a server-side issue.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/BatchCheckLayerAvailability
func (c *ECR) BatchCheckLayerAvailability(input *BatchCheckLayerAvailabilityInput) (*BatchCheckLayerAvailabilityOutput, error) {
req, out := c.BatchCheckLayerAvailabilityRequest(input)
return out, req.Send()
}
// BatchCheckLayerAvailabilityWithContext is the same as BatchCheckLayerAvailability with the addition of
// the ability to pass a context and additional request options.
//
// See BatchCheckLayerAvailability for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ECR) BatchCheckLayerAvailabilityWithContext(ctx aws.Context, input *BatchCheckLayerAvailabilityInput, opts ...request.Option) (*BatchCheckLayerAvailabilityOutput, error) {
req, out := c.BatchCheckLayerAvailabilityRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opBatchDeleteImage = "BatchDeleteImage"
// BatchDeleteImageRequest generates a "aws/request.Request" representing the
// client's request for the BatchDeleteImage operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See BatchDeleteImage for more information on using the BatchDeleteImage
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the BatchDeleteImageRequest method.
// req, resp := client.BatchDeleteImageRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/BatchDeleteImage
func (c *ECR) BatchDeleteImageRequest(input *BatchDeleteImageInput) (req *request.Request, output *BatchDeleteImageOutput) {
op := &request.Operation{
Name: opBatchDeleteImage,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &BatchDeleteImageInput{}
}
output = &BatchDeleteImageOutput{}
req = c.newRequest(op, input, output)
return
}
// BatchDeleteImage API operation for Amazon EC2 Container Registry.
//
// Deletes a list of specified images within a specified repository. Images
// are specified with either imageTag or imageDigest.
//
// You can remove a tag from an image by specifying the image's tag in your
// request. When you remove the last tag from an image, the image is deleted
// from your repository.
//
// You can completely delete an image (and all of its tags) by specifying the
// image's digest in your request.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon EC2 Container Registry's
// API operation BatchDeleteImage for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServerException "ServerException"
// These errors are usually caused by a server-side issue.
//
// * ErrCodeInvalidParameterException "InvalidParameterException"
// The specified parameter is invalid. Review the available parameters for the
// API request.
//
// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException"
// The specified repository could not be found. Check the spelling of the specified
// repository and ensure that you are performing operations on the correct registry.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/BatchDeleteImage
func (c *ECR) BatchDeleteImage(input *BatchDeleteImageInput) (*BatchDeleteImageOutput, error) {
req, out := c.BatchDeleteImageRequest(input)
return out, req.Send()
}
// BatchDeleteImageWithContext is the same as BatchDeleteImage with the addition of
// the ability to pass a context and additional request options.
//
// See BatchDeleteImage for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ECR) BatchDeleteImageWithContext(ctx aws.Context, input *BatchDeleteImageInput, opts ...request.Option) (*BatchDeleteImageOutput, error) {
req, out := c.BatchDeleteImageRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opBatchGetImage = "BatchGetImage"
// BatchGetImageRequest generates a "aws/request.Request" representing the
// client's request for the BatchGetImage operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See BatchGetImage for more information on using the BatchGetImage
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the BatchGetImageRequest method.
// req, resp := client.BatchGetImageRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/BatchGetImage
func (c *ECR) BatchGetImageRequest(input *BatchGetImageInput) (req *request.Request, output *BatchGetImageOutput) {
op := &request.Operation{
Name: opBatchGetImage,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &BatchGetImageInput{}
}
output = &BatchGetImageOutput{}
req = c.newRequest(op, input, output)
return
}
// BatchGetImage API operation for Amazon EC2 Container Registry.
//
// Gets detailed information for specified images within a specified repository.
// Images are specified with either imageTag or imageDigest.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon EC2 Container Registry's
// API operation BatchGetImage for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServerException "ServerException"
// These errors are usually caused by a server-side issue.
//
// * ErrCodeInvalidParameterException "InvalidParameterException"
// The specified parameter is invalid. Review the available parameters for the
// API request.
//
// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException"
// The specified repository could not be found. Check the spelling of the specified
// repository and ensure that you are performing operations on the correct registry.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/BatchGetImage
func (c *ECR) BatchGetImage(input *BatchGetImageInput) (*BatchGetImageOutput, error) {
req, out := c.BatchGetImageRequest(input)
return out, req.Send()
}
// BatchGetImageWithContext is the same as BatchGetImage with the addition of
// the ability to pass a context and additional request options.
//
// See BatchGetImage for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ECR) BatchGetImageWithContext(ctx aws.Context, input *BatchGetImageInput, opts ...request.Option) (*BatchGetImageOutput, error) {
req, out := c.BatchGetImageRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCompleteLayerUpload = "CompleteLayerUpload"
// CompleteLayerUploadRequest generates a "aws/request.Request" representing the
// client's request for the CompleteLayerUpload operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CompleteLayerUpload for more information on using the CompleteLayerUpload
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the CompleteLayerUploadRequest method.
// req, resp := client.CompleteLayerUploadRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/CompleteLayerUpload
func (c *ECR) CompleteLayerUploadRequest(input *CompleteLayerUploadInput) (req *request.Request, output *CompleteLayerUploadOutput) {
op := &request.Operation{
Name: opCompleteLayerUpload,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CompleteLayerUploadInput{}
}
output = &CompleteLayerUploadOutput{}
req = c.newRequest(op, input, output)
return
}
// CompleteLayerUpload API operation for Amazon EC2 Container Registry.
//
// Informs Amazon ECR that the image layer upload has completed for a specified
// registry, repository name, and upload ID. You can optionally provide a sha256
// digest of the image layer for data validation purposes.
//
// This operation is used by the Amazon ECR proxy, and it is not intended for
// general use by customers for pulling and pushing images. In most cases, you
// should use the docker CLI to pull, tag, and push images.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon EC2 Container Registry's
// API operation CompleteLayerUpload for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServerException "ServerException"
// These errors are usually caused by a server-side issue.
//
// * ErrCodeInvalidParameterException "InvalidParameterException"
// The specified parameter is invalid. Review the available parameters for the
// API request.
//
// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException"
// The specified repository could not be found. Check the spelling of the specified
// repository and ensure that you are performing operations on the correct registry.
//
// * ErrCodeUploadNotFoundException "UploadNotFoundException"
// The upload could not be found, or the specified upload id is not valid for
// this repository.
//
// * ErrCodeInvalidLayerException "InvalidLayerException"
// The layer digest calculation performed by Amazon ECR upon receipt of the
// image layer does not match the digest specified.
//
// * ErrCodeLayerPartTooSmallException "LayerPartTooSmallException"
// Layer parts must be at least 5 MiB in size.
//
// * ErrCodeLayerAlreadyExistsException "LayerAlreadyExistsException"
// The image layer already exists in the associated repository.
//
// * ErrCodeEmptyUploadException "EmptyUploadException"
// The specified layer upload does not contain any layer parts.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/CompleteLayerUpload
func (c *ECR) CompleteLayerUpload(input *CompleteLayerUploadInput) (*CompleteLayerUploadOutput, error) {
req, out := c.CompleteLayerUploadRequest(input)
return out, req.Send()
}
// CompleteLayerUploadWithContext is the same as CompleteLayerUpload with the addition of
// the ability to pass a context and additional request options.
//
// See CompleteLayerUpload for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ECR) CompleteLayerUploadWithContext(ctx aws.Context, input *CompleteLayerUploadInput, opts ...request.Option) (*CompleteLayerUploadOutput, error) {
req, out := c.CompleteLayerUploadRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opCreateRepository = "CreateRepository"
// CreateRepositoryRequest generates a "aws/request.Request" representing the
// client's request for the CreateRepository operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See CreateRepository for more information on using the CreateRepository
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the CreateRepositoryRequest method.
// req, resp := client.CreateRepositoryRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/CreateRepository
func (c *ECR) CreateRepositoryRequest(input *CreateRepositoryInput) (req *request.Request, output *CreateRepositoryOutput) {
op := &request.Operation{
Name: opCreateRepository,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateRepositoryInput{}
}
output = &CreateRepositoryOutput{}
req = c.newRequest(op, input, output)
return
}
// CreateRepository API operation for Amazon EC2 Container Registry.
//
// Creates an image repository.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon EC2 Container Registry's
// API operation CreateRepository for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServerException "ServerException"
// These errors are usually caused by a server-side issue.
//
// * ErrCodeInvalidParameterException "InvalidParameterException"
// The specified parameter is invalid. Review the available parameters for the
// API request.
//
// * ErrCodeInvalidTagParameterException "InvalidTagParameterException"
// An invalid parameter has been specified. Tag keys can have a maximum character
// length of 128 characters, and tag values can have a maximum length of 256
// characters.
//
// * ErrCodeTooManyTagsException "TooManyTagsException"
// The list of tags on the repository is over the limit. The maximum number
// of tags that can be applied to a repository is 50.
//
// * ErrCodeRepositoryAlreadyExistsException "RepositoryAlreadyExistsException"
// The specified repository already exists in the specified registry.
//
// * ErrCodeLimitExceededException "LimitExceededException"
// The operation did not succeed because it would have exceeded a service limit
// for your account. For more information, see Amazon ECR Default Service Limits
// (https://docs.aws.amazon.com/AmazonECR/latest/userguide/service_limits.html)
// in the Amazon Elastic Container Registry User Guide.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/CreateRepository
func (c *ECR) CreateRepository(input *CreateRepositoryInput) (*CreateRepositoryOutput, error) {
req, out := c.CreateRepositoryRequest(input)
return out, req.Send()
}
// CreateRepositoryWithContext is the same as CreateRepository with the addition of
// the ability to pass a context and additional request options.
//
// See CreateRepository for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ECR) CreateRepositoryWithContext(ctx aws.Context, input *CreateRepositoryInput, opts ...request.Option) (*CreateRepositoryOutput, error) {
req, out := c.CreateRepositoryRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteLifecyclePolicy = "DeleteLifecyclePolicy"
// DeleteLifecyclePolicyRequest generates a "aws/request.Request" representing the
// client's request for the DeleteLifecyclePolicy operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteLifecyclePolicy for more information on using the DeleteLifecyclePolicy
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteLifecyclePolicyRequest method.
// req, resp := client.DeleteLifecyclePolicyRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DeleteLifecyclePolicy
func (c *ECR) DeleteLifecyclePolicyRequest(input *DeleteLifecyclePolicyInput) (req *request.Request, output *DeleteLifecyclePolicyOutput) {
op := &request.Operation{
Name: opDeleteLifecyclePolicy,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteLifecyclePolicyInput{}
}
output = &DeleteLifecyclePolicyOutput{}
req = c.newRequest(op, input, output)
return
}
// DeleteLifecyclePolicy API operation for Amazon EC2 Container Registry.
//
// Deletes the specified lifecycle policy.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon EC2 Container Registry's
// API operation DeleteLifecyclePolicy for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServerException "ServerException"
// These errors are usually caused by a server-side issue.
//
// * ErrCodeInvalidParameterException "InvalidParameterException"
// The specified parameter is invalid. Review the available parameters for the
// API request.
//
// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException"
// The specified repository could not be found. Check the spelling of the specified
// repository and ensure that you are performing operations on the correct registry.
//
// * ErrCodeLifecyclePolicyNotFoundException "LifecyclePolicyNotFoundException"
// The lifecycle policy could not be found, and no policy is set to the repository.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DeleteLifecyclePolicy
func (c *ECR) DeleteLifecyclePolicy(input *DeleteLifecyclePolicyInput) (*DeleteLifecyclePolicyOutput, error) {
req, out := c.DeleteLifecyclePolicyRequest(input)
return out, req.Send()
}
// DeleteLifecyclePolicyWithContext is the same as DeleteLifecyclePolicy with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteLifecyclePolicy for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ECR) DeleteLifecyclePolicyWithContext(ctx aws.Context, input *DeleteLifecyclePolicyInput, opts ...request.Option) (*DeleteLifecyclePolicyOutput, error) {
req, out := c.DeleteLifecyclePolicyRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteRepository = "DeleteRepository"
// DeleteRepositoryRequest generates a "aws/request.Request" representing the
// client's request for the DeleteRepository operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteRepository for more information on using the DeleteRepository
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteRepositoryRequest method.
// req, resp := client.DeleteRepositoryRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DeleteRepository
func (c *ECR) DeleteRepositoryRequest(input *DeleteRepositoryInput) (req *request.Request, output *DeleteRepositoryOutput) {
op := &request.Operation{
Name: opDeleteRepository,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteRepositoryInput{}
}
output = &DeleteRepositoryOutput{}
req = c.newRequest(op, input, output)
return
}
// DeleteRepository API operation for Amazon EC2 Container Registry.
//
// Deletes an existing image repository. If a repository contains images, you
// must use the force option to delete it.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon EC2 Container Registry's
// API operation DeleteRepository for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServerException "ServerException"
// These errors are usually caused by a server-side issue.
//
// * ErrCodeInvalidParameterException "InvalidParameterException"
// The specified parameter is invalid. Review the available parameters for the
// API request.
//
// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException"
// The specified repository could not be found. Check the spelling of the specified
// repository and ensure that you are performing operations on the correct registry.
//
// * ErrCodeRepositoryNotEmptyException "RepositoryNotEmptyException"
// The specified repository contains images. To delete a repository that contains
// images, you must force the deletion with the force parameter.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DeleteRepository
func (c *ECR) DeleteRepository(input *DeleteRepositoryInput) (*DeleteRepositoryOutput, error) {
req, out := c.DeleteRepositoryRequest(input)
return out, req.Send()
}
// DeleteRepositoryWithContext is the same as DeleteRepository with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteRepository for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ECR) DeleteRepositoryWithContext(ctx aws.Context, input *DeleteRepositoryInput, opts ...request.Option) (*DeleteRepositoryOutput, error) {
req, out := c.DeleteRepositoryRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDeleteRepositoryPolicy = "DeleteRepositoryPolicy"
// DeleteRepositoryPolicyRequest generates a "aws/request.Request" representing the
// client's request for the DeleteRepositoryPolicy operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DeleteRepositoryPolicy for more information on using the DeleteRepositoryPolicy
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DeleteRepositoryPolicyRequest method.
// req, resp := client.DeleteRepositoryPolicyRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DeleteRepositoryPolicy
func (c *ECR) DeleteRepositoryPolicyRequest(input *DeleteRepositoryPolicyInput) (req *request.Request, output *DeleteRepositoryPolicyOutput) {
op := &request.Operation{
Name: opDeleteRepositoryPolicy,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteRepositoryPolicyInput{}
}
output = &DeleteRepositoryPolicyOutput{}
req = c.newRequest(op, input, output)
return
}
// DeleteRepositoryPolicy API operation for Amazon EC2 Container Registry.
//
// Deletes the repository policy from a specified repository.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon EC2 Container Registry's
// API operation DeleteRepositoryPolicy for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServerException "ServerException"
// These errors are usually caused by a server-side issue.
//
// * ErrCodeInvalidParameterException "InvalidParameterException"
// The specified parameter is invalid. Review the available parameters for the
// API request.
//
// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException"
// The specified repository could not be found. Check the spelling of the specified
// repository and ensure that you are performing operations on the correct registry.
//
// * ErrCodeRepositoryPolicyNotFoundException "RepositoryPolicyNotFoundException"
// The specified repository and registry combination does not have an associated
// repository policy.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DeleteRepositoryPolicy
func (c *ECR) DeleteRepositoryPolicy(input *DeleteRepositoryPolicyInput) (*DeleteRepositoryPolicyOutput, error) {
req, out := c.DeleteRepositoryPolicyRequest(input)
return out, req.Send()
}
// DeleteRepositoryPolicyWithContext is the same as DeleteRepositoryPolicy with the addition of
// the ability to pass a context and additional request options.
//
// See DeleteRepositoryPolicy for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ECR) DeleteRepositoryPolicyWithContext(ctx aws.Context, input *DeleteRepositoryPolicyInput, opts ...request.Option) (*DeleteRepositoryPolicyOutput, error) {
req, out := c.DeleteRepositoryPolicyRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opDescribeImages = "DescribeImages"
// DescribeImagesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeImages operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeImages for more information on using the DescribeImages
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeImagesRequest method.
// req, resp := client.DescribeImagesRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DescribeImages
func (c *ECR) DescribeImagesRequest(input *DescribeImagesInput) (req *request.Request, output *DescribeImagesOutput) {
op := &request.Operation{
Name: opDescribeImages,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"nextToken"},
OutputTokens: []string{"nextToken"},
LimitToken: "maxResults",
TruncationToken: "",
},
}
if input == nil {
input = &DescribeImagesInput{}
}
output = &DescribeImagesOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeImages API operation for Amazon EC2 Container Registry.
//
// Returns metadata about the images in a repository, including image size,
// image tags, and creation date.
//
// Beginning with Docker version 1.9, the Docker client compresses image layers
// before pushing them to a V2 Docker registry. The output of the docker images
// command shows the uncompressed image size, so it may return a larger image
// size than the image sizes returned by DescribeImages.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon EC2 Container Registry's
// API operation DescribeImages for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServerException "ServerException"
// These errors are usually caused by a server-side issue.
//
// * ErrCodeInvalidParameterException "InvalidParameterException"
// The specified parameter is invalid. Review the available parameters for the
// API request.
//
// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException"
// The specified repository could not be found. Check the spelling of the specified
// repository and ensure that you are performing operations on the correct registry.
//
// * ErrCodeImageNotFoundException "ImageNotFoundException"
// The image requested does not exist in the specified repository.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DescribeImages
func (c *ECR) DescribeImages(input *DescribeImagesInput) (*DescribeImagesOutput, error) {
req, out := c.DescribeImagesRequest(input)
return out, req.Send()
}
// DescribeImagesWithContext is the same as DescribeImages with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeImages for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ECR) DescribeImagesWithContext(ctx aws.Context, input *DescribeImagesInput, opts ...request.Option) (*DescribeImagesOutput, error) {
req, out := c.DescribeImagesRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// DescribeImagesPages iterates over the pages of a DescribeImages operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See DescribeImages method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a DescribeImages operation.
// pageNum := 0
// err := client.DescribeImagesPages(params,
// func(page *ecr.DescribeImagesOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *ECR) DescribeImagesPages(input *DescribeImagesInput, fn func(*DescribeImagesOutput, bool) bool) error {
return c.DescribeImagesPagesWithContext(aws.BackgroundContext(), input, fn)
}
// DescribeImagesPagesWithContext same as DescribeImagesPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ECR) DescribeImagesPagesWithContext(ctx aws.Context, input *DescribeImagesInput, fn func(*DescribeImagesOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *DescribeImagesInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.DescribeImagesRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*DescribeImagesOutput), !p.HasNextPage())
}
return p.Err()
}
const opDescribeRepositories = "DescribeRepositories"
// DescribeRepositoriesRequest generates a "aws/request.Request" representing the
// client's request for the DescribeRepositories operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See DescribeRepositories for more information on using the DescribeRepositories
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the DescribeRepositoriesRequest method.
// req, resp := client.DescribeRepositoriesRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DescribeRepositories
func (c *ECR) DescribeRepositoriesRequest(input *DescribeRepositoriesInput) (req *request.Request, output *DescribeRepositoriesOutput) {
op := &request.Operation{
Name: opDescribeRepositories,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"nextToken"},
OutputTokens: []string{"nextToken"},
LimitToken: "maxResults",
TruncationToken: "",
},
}
if input == nil {
input = &DescribeRepositoriesInput{}
}
output = &DescribeRepositoriesOutput{}
req = c.newRequest(op, input, output)
return
}
// DescribeRepositories API operation for Amazon EC2 Container Registry.
//
// Describes image repositories in a registry.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon EC2 Container Registry's
// API operation DescribeRepositories for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServerException "ServerException"
// These errors are usually caused by a server-side issue.
//
// * ErrCodeInvalidParameterException "InvalidParameterException"
// The specified parameter is invalid. Review the available parameters for the
// API request.
//
// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException"
// The specified repository could not be found. Check the spelling of the specified
// repository and ensure that you are performing operations on the correct registry.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/DescribeRepositories
func (c *ECR) DescribeRepositories(input *DescribeRepositoriesInput) (*DescribeRepositoriesOutput, error) {
req, out := c.DescribeRepositoriesRequest(input)
return out, req.Send()
}
// DescribeRepositoriesWithContext is the same as DescribeRepositories with the addition of
// the ability to pass a context and additional request options.
//
// See DescribeRepositories for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ECR) DescribeRepositoriesWithContext(ctx aws.Context, input *DescribeRepositoriesInput, opts ...request.Option) (*DescribeRepositoriesOutput, error) {
req, out := c.DescribeRepositoriesRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// DescribeRepositoriesPages iterates over the pages of a DescribeRepositories operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See DescribeRepositories method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a DescribeRepositories operation.
// pageNum := 0
// err := client.DescribeRepositoriesPages(params,
// func(page *ecr.DescribeRepositoriesOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *ECR) DescribeRepositoriesPages(input *DescribeRepositoriesInput, fn func(*DescribeRepositoriesOutput, bool) bool) error {
return c.DescribeRepositoriesPagesWithContext(aws.BackgroundContext(), input, fn)
}
// DescribeRepositoriesPagesWithContext same as DescribeRepositoriesPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ECR) DescribeRepositoriesPagesWithContext(ctx aws.Context, input *DescribeRepositoriesInput, fn func(*DescribeRepositoriesOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *DescribeRepositoriesInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.DescribeRepositoriesRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*DescribeRepositoriesOutput), !p.HasNextPage())
}
return p.Err()
}
const opGetAuthorizationToken = "GetAuthorizationToken"
// GetAuthorizationTokenRequest generates a "aws/request.Request" representing the
// client's request for the GetAuthorizationToken operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetAuthorizationToken for more information on using the GetAuthorizationToken
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the GetAuthorizationTokenRequest method.
// req, resp := client.GetAuthorizationTokenRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetAuthorizationToken
func (c *ECR) GetAuthorizationTokenRequest(input *GetAuthorizationTokenInput) (req *request.Request, output *GetAuthorizationTokenOutput) {
op := &request.Operation{
Name: opGetAuthorizationToken,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &GetAuthorizationTokenInput{}
}
output = &GetAuthorizationTokenOutput{}
req = c.newRequest(op, input, output)
return
}
// GetAuthorizationToken API operation for Amazon EC2 Container Registry.
//
// Retrieves a token that is valid for a specified registry for 12 hours. This
// command allows you to use the docker CLI to push and pull images with Amazon
// ECR. If you do not specify a registry, the default registry is assumed.
//
// The authorizationToken returned for each registry specified is a base64 encoded
// string that can be decoded and used in a docker login command to authenticate
// to a registry. The AWS CLI offers an aws ecr get-login command that simplifies
// the login process.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon EC2 Container Registry's
// API operation GetAuthorizationToken for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServerException "ServerException"
// These errors are usually caused by a server-side issue.
//
// * ErrCodeInvalidParameterException "InvalidParameterException"
// The specified parameter is invalid. Review the available parameters for the
// API request.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetAuthorizationToken
func (c *ECR) GetAuthorizationToken(input *GetAuthorizationTokenInput) (*GetAuthorizationTokenOutput, error) {
req, out := c.GetAuthorizationTokenRequest(input)
return out, req.Send()
}
// GetAuthorizationTokenWithContext is the same as GetAuthorizationToken with the addition of
// the ability to pass a context and additional request options.
//
// See GetAuthorizationToken for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ECR) GetAuthorizationTokenWithContext(ctx aws.Context, input *GetAuthorizationTokenInput, opts ...request.Option) (*GetAuthorizationTokenOutput, error) {
req, out := c.GetAuthorizationTokenRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetDownloadUrlForLayer = "GetDownloadUrlForLayer"
// GetDownloadUrlForLayerRequest generates a "aws/request.Request" representing the
// client's request for the GetDownloadUrlForLayer operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetDownloadUrlForLayer for more information on using the GetDownloadUrlForLayer
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the GetDownloadUrlForLayerRequest method.
// req, resp := client.GetDownloadUrlForLayerRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetDownloadUrlForLayer
func (c *ECR) GetDownloadUrlForLayerRequest(input *GetDownloadUrlForLayerInput) (req *request.Request, output *GetDownloadUrlForLayerOutput) {
op := &request.Operation{
Name: opGetDownloadUrlForLayer,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &GetDownloadUrlForLayerInput{}
}
output = &GetDownloadUrlForLayerOutput{}
req = c.newRequest(op, input, output)
return
}
// GetDownloadUrlForLayer API operation for Amazon EC2 Container Registry.
//
// Retrieves the pre-signed Amazon S3 download URL corresponding to an image
// layer. You can only get URLs for image layers that are referenced in an image.
//
// This operation is used by the Amazon ECR proxy, and it is not intended for
// general use by customers for pulling and pushing images. In most cases, you
// should use the docker CLI to pull, tag, and push images.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon EC2 Container Registry's
// API operation GetDownloadUrlForLayer for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServerException "ServerException"
// These errors are usually caused by a server-side issue.
//
// * ErrCodeInvalidParameterException "InvalidParameterException"
// The specified parameter is invalid. Review the available parameters for the
// API request.
//
// * ErrCodeLayersNotFoundException "LayersNotFoundException"
// The specified layers could not be found, or the specified layer is not valid
// for this repository.
//
// * ErrCodeLayerInaccessibleException "LayerInaccessibleException"
// The specified layer is not available because it is not associated with an
// image. Unassociated image layers may be cleaned up at any time.
//
// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException"
// The specified repository could not be found. Check the spelling of the specified
// repository and ensure that you are performing operations on the correct registry.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetDownloadUrlForLayer
func (c *ECR) GetDownloadUrlForLayer(input *GetDownloadUrlForLayerInput) (*GetDownloadUrlForLayerOutput, error) {
req, out := c.GetDownloadUrlForLayerRequest(input)
return out, req.Send()
}
// GetDownloadUrlForLayerWithContext is the same as GetDownloadUrlForLayer with the addition of
// the ability to pass a context and additional request options.
//
// See GetDownloadUrlForLayer for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ECR) GetDownloadUrlForLayerWithContext(ctx aws.Context, input *GetDownloadUrlForLayerInput, opts ...request.Option) (*GetDownloadUrlForLayerOutput, error) {
req, out := c.GetDownloadUrlForLayerRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetLifecyclePolicy = "GetLifecyclePolicy"
// GetLifecyclePolicyRequest generates a "aws/request.Request" representing the
// client's request for the GetLifecyclePolicy operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetLifecyclePolicy for more information on using the GetLifecyclePolicy
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the GetLifecyclePolicyRequest method.
// req, resp := client.GetLifecyclePolicyRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetLifecyclePolicy
func (c *ECR) GetLifecyclePolicyRequest(input *GetLifecyclePolicyInput) (req *request.Request, output *GetLifecyclePolicyOutput) {
op := &request.Operation{
Name: opGetLifecyclePolicy,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &GetLifecyclePolicyInput{}
}
output = &GetLifecyclePolicyOutput{}
req = c.newRequest(op, input, output)
return
}
// GetLifecyclePolicy API operation for Amazon EC2 Container Registry.
//
// Retrieves the specified lifecycle policy.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon EC2 Container Registry's
// API operation GetLifecyclePolicy for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServerException "ServerException"
// These errors are usually caused by a server-side issue.
//
// * ErrCodeInvalidParameterException "InvalidParameterException"
// The specified parameter is invalid. Review the available parameters for the
// API request.
//
// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException"
// The specified repository could not be found. Check the spelling of the specified
// repository and ensure that you are performing operations on the correct registry.
//
// * ErrCodeLifecyclePolicyNotFoundException "LifecyclePolicyNotFoundException"
// The lifecycle policy could not be found, and no policy is set to the repository.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetLifecyclePolicy
func (c *ECR) GetLifecyclePolicy(input *GetLifecyclePolicyInput) (*GetLifecyclePolicyOutput, error) {
req, out := c.GetLifecyclePolicyRequest(input)
return out, req.Send()
}
// GetLifecyclePolicyWithContext is the same as GetLifecyclePolicy with the addition of
// the ability to pass a context and additional request options.
//
// See GetLifecyclePolicy for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ECR) GetLifecyclePolicyWithContext(ctx aws.Context, input *GetLifecyclePolicyInput, opts ...request.Option) (*GetLifecyclePolicyOutput, error) {
req, out := c.GetLifecyclePolicyRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetLifecyclePolicyPreview = "GetLifecyclePolicyPreview"
// GetLifecyclePolicyPreviewRequest generates a "aws/request.Request" representing the
// client's request for the GetLifecyclePolicyPreview operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetLifecyclePolicyPreview for more information on using the GetLifecyclePolicyPreview
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the GetLifecyclePolicyPreviewRequest method.
// req, resp := client.GetLifecyclePolicyPreviewRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetLifecyclePolicyPreview
func (c *ECR) GetLifecyclePolicyPreviewRequest(input *GetLifecyclePolicyPreviewInput) (req *request.Request, output *GetLifecyclePolicyPreviewOutput) {
op := &request.Operation{
Name: opGetLifecyclePolicyPreview,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &GetLifecyclePolicyPreviewInput{}
}
output = &GetLifecyclePolicyPreviewOutput{}
req = c.newRequest(op, input, output)
return
}
// GetLifecyclePolicyPreview API operation for Amazon EC2 Container Registry.
//
// Retrieves the results of the specified lifecycle policy preview request.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon EC2 Container Registry's
// API operation GetLifecyclePolicyPreview for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServerException "ServerException"
// These errors are usually caused by a server-side issue.
//
// * ErrCodeInvalidParameterException "InvalidParameterException"
// The specified parameter is invalid. Review the available parameters for the
// API request.
//
// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException"
// The specified repository could not be found. Check the spelling of the specified
// repository and ensure that you are performing operations on the correct registry.
//
// * ErrCodeLifecyclePolicyPreviewNotFoundException "LifecyclePolicyPreviewNotFoundException"
// There is no dry run for this repository.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetLifecyclePolicyPreview
func (c *ECR) GetLifecyclePolicyPreview(input *GetLifecyclePolicyPreviewInput) (*GetLifecyclePolicyPreviewOutput, error) {
req, out := c.GetLifecyclePolicyPreviewRequest(input)
return out, req.Send()
}
// GetLifecyclePolicyPreviewWithContext is the same as GetLifecyclePolicyPreview with the addition of
// the ability to pass a context and additional request options.
//
// See GetLifecyclePolicyPreview for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ECR) GetLifecyclePolicyPreviewWithContext(ctx aws.Context, input *GetLifecyclePolicyPreviewInput, opts ...request.Option) (*GetLifecyclePolicyPreviewOutput, error) {
req, out := c.GetLifecyclePolicyPreviewRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opGetRepositoryPolicy = "GetRepositoryPolicy"
// GetRepositoryPolicyRequest generates a "aws/request.Request" representing the
// client's request for the GetRepositoryPolicy operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See GetRepositoryPolicy for more information on using the GetRepositoryPolicy
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the GetRepositoryPolicyRequest method.
// req, resp := client.GetRepositoryPolicyRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetRepositoryPolicy
func (c *ECR) GetRepositoryPolicyRequest(input *GetRepositoryPolicyInput) (req *request.Request, output *GetRepositoryPolicyOutput) {
op := &request.Operation{
Name: opGetRepositoryPolicy,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &GetRepositoryPolicyInput{}
}
output = &GetRepositoryPolicyOutput{}
req = c.newRequest(op, input, output)
return
}
// GetRepositoryPolicy API operation for Amazon EC2 Container Registry.
//
// Retrieves the repository policy for a specified repository.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon EC2 Container Registry's
// API operation GetRepositoryPolicy for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServerException "ServerException"
// These errors are usually caused by a server-side issue.
//
// * ErrCodeInvalidParameterException "InvalidParameterException"
// The specified parameter is invalid. Review the available parameters for the
// API request.
//
// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException"
// The specified repository could not be found. Check the spelling of the specified
// repository and ensure that you are performing operations on the correct registry.
//
// * ErrCodeRepositoryPolicyNotFoundException "RepositoryPolicyNotFoundException"
// The specified repository and registry combination does not have an associated
// repository policy.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/GetRepositoryPolicy
func (c *ECR) GetRepositoryPolicy(input *GetRepositoryPolicyInput) (*GetRepositoryPolicyOutput, error) {
req, out := c.GetRepositoryPolicyRequest(input)
return out, req.Send()
}
// GetRepositoryPolicyWithContext is the same as GetRepositoryPolicy with the addition of
// the ability to pass a context and additional request options.
//
// See GetRepositoryPolicy for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ECR) GetRepositoryPolicyWithContext(ctx aws.Context, input *GetRepositoryPolicyInput, opts ...request.Option) (*GetRepositoryPolicyOutput, error) {
req, out := c.GetRepositoryPolicyRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opInitiateLayerUpload = "InitiateLayerUpload"
// InitiateLayerUploadRequest generates a "aws/request.Request" representing the
// client's request for the InitiateLayerUpload operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See InitiateLayerUpload for more information on using the InitiateLayerUpload
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the InitiateLayerUploadRequest method.
// req, resp := client.InitiateLayerUploadRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/InitiateLayerUpload
func (c *ECR) InitiateLayerUploadRequest(input *InitiateLayerUploadInput) (req *request.Request, output *InitiateLayerUploadOutput) {
op := &request.Operation{
Name: opInitiateLayerUpload,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &InitiateLayerUploadInput{}
}
output = &InitiateLayerUploadOutput{}
req = c.newRequest(op, input, output)
return
}
// InitiateLayerUpload API operation for Amazon EC2 Container Registry.
//
// Notify Amazon ECR that you intend to upload an image layer.
//
// This operation is used by the Amazon ECR proxy, and it is not intended for
// general use by customers for pulling and pushing images. In most cases, you
// should use the docker CLI to pull, tag, and push images.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon EC2 Container Registry's
// API operation InitiateLayerUpload for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServerException "ServerException"
// These errors are usually caused by a server-side issue.
//
// * ErrCodeInvalidParameterException "InvalidParameterException"
// The specified parameter is invalid. Review the available parameters for the
// API request.
//
// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException"
// The specified repository could not be found. Check the spelling of the specified
// repository and ensure that you are performing operations on the correct registry.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/InitiateLayerUpload
func (c *ECR) InitiateLayerUpload(input *InitiateLayerUploadInput) (*InitiateLayerUploadOutput, error) {
req, out := c.InitiateLayerUploadRequest(input)
return out, req.Send()
}
// InitiateLayerUploadWithContext is the same as InitiateLayerUpload with the addition of
// the ability to pass a context and additional request options.
//
// See InitiateLayerUpload for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ECR) InitiateLayerUploadWithContext(ctx aws.Context, input *InitiateLayerUploadInput, opts ...request.Option) (*InitiateLayerUploadOutput, error) {
req, out := c.InitiateLayerUploadRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opListImages = "ListImages"
// ListImagesRequest generates a "aws/request.Request" representing the
// client's request for the ListImages operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListImages for more information on using the ListImages
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ListImagesRequest method.
// req, resp := client.ListImagesRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ListImages
func (c *ECR) ListImagesRequest(input *ListImagesInput) (req *request.Request, output *ListImagesOutput) {
op := &request.Operation{
Name: opListImages,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &request.Paginator{
InputTokens: []string{"nextToken"},
OutputTokens: []string{"nextToken"},
LimitToken: "maxResults",
TruncationToken: "",
},
}
if input == nil {
input = &ListImagesInput{}
}
output = &ListImagesOutput{}
req = c.newRequest(op, input, output)
return
}
// ListImages API operation for Amazon EC2 Container Registry.
//
// Lists all the image IDs for a given repository.
//
// You can filter images based on whether or not they are tagged by setting
// the tagStatus parameter to TAGGED or UNTAGGED. For example, you can filter
// your results to return only UNTAGGED images and then pipe that result to
// a BatchDeleteImage operation to delete them. Or, you can filter your results
// to return only TAGGED images to list all of the tags in your repository.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon EC2 Container Registry's
// API operation ListImages for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServerException "ServerException"
// These errors are usually caused by a server-side issue.
//
// * ErrCodeInvalidParameterException "InvalidParameterException"
// The specified parameter is invalid. Review the available parameters for the
// API request.
//
// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException"
// The specified repository could not be found. Check the spelling of the specified
// repository and ensure that you are performing operations on the correct registry.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ListImages
func (c *ECR) ListImages(input *ListImagesInput) (*ListImagesOutput, error) {
req, out := c.ListImagesRequest(input)
return out, req.Send()
}
// ListImagesWithContext is the same as ListImages with the addition of
// the ability to pass a context and additional request options.
//
// See ListImages for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ECR) ListImagesWithContext(ctx aws.Context, input *ListImagesInput, opts ...request.Option) (*ListImagesOutput, error) {
req, out := c.ListImagesRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// ListImagesPages iterates over the pages of a ListImages operation,
// calling the "fn" function with the response data for each page. To stop
// iterating, return false from the fn function.
//
// See ListImages method for more information on how to use this operation.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a ListImages operation.
// pageNum := 0
// err := client.ListImagesPages(params,
// func(page *ecr.ListImagesOutput, lastPage bool) bool {
// pageNum++
// fmt.Println(page)
// return pageNum <= 3
// })
//
func (c *ECR) ListImagesPages(input *ListImagesInput, fn func(*ListImagesOutput, bool) bool) error {
return c.ListImagesPagesWithContext(aws.BackgroundContext(), input, fn)
}
// ListImagesPagesWithContext same as ListImagesPages except
// it takes a Context and allows setting request options on the pages.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ECR) ListImagesPagesWithContext(ctx aws.Context, input *ListImagesInput, fn func(*ListImagesOutput, bool) bool, opts ...request.Option) error {
p := request.Pagination{
NewRequest: func() (*request.Request, error) {
var inCpy *ListImagesInput
if input != nil {
tmp := *input
inCpy = &tmp
}
req, _ := c.ListImagesRequest(inCpy)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return req, nil
},
}
cont := true
for p.Next() && cont {
cont = fn(p.Page().(*ListImagesOutput), !p.HasNextPage())
}
return p.Err()
}
const opListTagsForResource = "ListTagsForResource"
// ListTagsForResourceRequest generates a "aws/request.Request" representing the
// client's request for the ListTagsForResource operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See ListTagsForResource for more information on using the ListTagsForResource
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the ListTagsForResourceRequest method.
// req, resp := client.ListTagsForResourceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ListTagsForResource
func (c *ECR) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) {
op := &request.Operation{
Name: opListTagsForResource,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &ListTagsForResourceInput{}
}
output = &ListTagsForResourceOutput{}
req = c.newRequest(op, input, output)
return
}
// ListTagsForResource API operation for Amazon EC2 Container Registry.
//
// List the tags for an Amazon ECR resource.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon EC2 Container Registry's
// API operation ListTagsForResource for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidParameterException "InvalidParameterException"
// The specified parameter is invalid. Review the available parameters for the
// API request.
//
// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException"
// The specified repository could not be found. Check the spelling of the specified
// repository and ensure that you are performing operations on the correct registry.
//
// * ErrCodeServerException "ServerException"
// These errors are usually caused by a server-side issue.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/ListTagsForResource
func (c *ECR) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) {
req, out := c.ListTagsForResourceRequest(input)
return out, req.Send()
}
// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of
// the ability to pass a context and additional request options.
//
// See ListTagsForResource for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ECR) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) {
req, out := c.ListTagsForResourceRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opPutImage = "PutImage"
// PutImageRequest generates a "aws/request.Request" representing the
// client's request for the PutImage operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See PutImage for more information on using the PutImage
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the PutImageRequest method.
// req, resp := client.PutImageRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PutImage
func (c *ECR) PutImageRequest(input *PutImageInput) (req *request.Request, output *PutImageOutput) {
op := &request.Operation{
Name: opPutImage,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &PutImageInput{}
}
output = &PutImageOutput{}
req = c.newRequest(op, input, output)
return
}
// PutImage API operation for Amazon EC2 Container Registry.
//
// Creates or updates the image manifest and tags associated with an image.
//
// This operation is used by the Amazon ECR proxy, and it is not intended for
// general use by customers for pulling and pushing images. In most cases, you
// should use the docker CLI to pull, tag, and push images.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon EC2 Container Registry's
// API operation PutImage for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServerException "ServerException"
// These errors are usually caused by a server-side issue.
//
// * ErrCodeInvalidParameterException "InvalidParameterException"
// The specified parameter is invalid. Review the available parameters for the
// API request.
//
// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException"
// The specified repository could not be found. Check the spelling of the specified
// repository and ensure that you are performing operations on the correct registry.
//
// * ErrCodeImageAlreadyExistsException "ImageAlreadyExistsException"
// The specified image has already been pushed, and there were no changes to
// the manifest or image tag after the last push.
//
// * ErrCodeLayersNotFoundException "LayersNotFoundException"
// The specified layers could not be found, or the specified layer is not valid
// for this repository.
//
// * ErrCodeLimitExceededException "LimitExceededException"
// The operation did not succeed because it would have exceeded a service limit
// for your account. For more information, see Amazon ECR Default Service Limits
// (https://docs.aws.amazon.com/AmazonECR/latest/userguide/service_limits.html)
// in the Amazon Elastic Container Registry User Guide.
//
// * ErrCodeImageTagAlreadyExistsException "ImageTagAlreadyExistsException"
// The specified image is tagged with a tag that already exists. The repository
// is configured for tag immutability.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PutImage
func (c *ECR) PutImage(input *PutImageInput) (*PutImageOutput, error) {
req, out := c.PutImageRequest(input)
return out, req.Send()
}
// PutImageWithContext is the same as PutImage with the addition of
// the ability to pass a context and additional request options.
//
// See PutImage for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ECR) PutImageWithContext(ctx aws.Context, input *PutImageInput, opts ...request.Option) (*PutImageOutput, error) {
req, out := c.PutImageRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opPutImageTagMutability = "PutImageTagMutability"
// PutImageTagMutabilityRequest generates a "aws/request.Request" representing the
// client's request for the PutImageTagMutability operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See PutImageTagMutability for more information on using the PutImageTagMutability
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the PutImageTagMutabilityRequest method.
// req, resp := client.PutImageTagMutabilityRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PutImageTagMutability
func (c *ECR) PutImageTagMutabilityRequest(input *PutImageTagMutabilityInput) (req *request.Request, output *PutImageTagMutabilityOutput) {
op := &request.Operation{
Name: opPutImageTagMutability,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &PutImageTagMutabilityInput{}
}
output = &PutImageTagMutabilityOutput{}
req = c.newRequest(op, input, output)
return
}
// PutImageTagMutability API operation for Amazon EC2 Container Registry.
//
// Updates the image tag mutability settings for a repository.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon EC2 Container Registry's
// API operation PutImageTagMutability for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServerException "ServerException"
// These errors are usually caused by a server-side issue.
//
// * ErrCodeInvalidParameterException "InvalidParameterException"
// The specified parameter is invalid. Review the available parameters for the
// API request.
//
// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException"
// The specified repository could not be found. Check the spelling of the specified
// repository and ensure that you are performing operations on the correct registry.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PutImageTagMutability
func (c *ECR) PutImageTagMutability(input *PutImageTagMutabilityInput) (*PutImageTagMutabilityOutput, error) {
req, out := c.PutImageTagMutabilityRequest(input)
return out, req.Send()
}
// PutImageTagMutabilityWithContext is the same as PutImageTagMutability with the addition of
// the ability to pass a context and additional request options.
//
// See PutImageTagMutability for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ECR) PutImageTagMutabilityWithContext(ctx aws.Context, input *PutImageTagMutabilityInput, opts ...request.Option) (*PutImageTagMutabilityOutput, error) {
req, out := c.PutImageTagMutabilityRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opPutLifecyclePolicy = "PutLifecyclePolicy"
// PutLifecyclePolicyRequest generates a "aws/request.Request" representing the
// client's request for the PutLifecyclePolicy operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See PutLifecyclePolicy for more information on using the PutLifecyclePolicy
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the PutLifecyclePolicyRequest method.
// req, resp := client.PutLifecyclePolicyRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PutLifecyclePolicy
func (c *ECR) PutLifecyclePolicyRequest(input *PutLifecyclePolicyInput) (req *request.Request, output *PutLifecyclePolicyOutput) {
op := &request.Operation{
Name: opPutLifecyclePolicy,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &PutLifecyclePolicyInput{}
}
output = &PutLifecyclePolicyOutput{}
req = c.newRequest(op, input, output)
return
}
// PutLifecyclePolicy API operation for Amazon EC2 Container Registry.
//
// Creates or updates a lifecycle policy. For information about lifecycle policy
// syntax, see Lifecycle Policy Template (https://docs.aws.amazon.com/AmazonECR/latest/userguide/LifecyclePolicies.html).
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon EC2 Container Registry's
// API operation PutLifecyclePolicy for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServerException "ServerException"
// These errors are usually caused by a server-side issue.
//
// * ErrCodeInvalidParameterException "InvalidParameterException"
// The specified parameter is invalid. Review the available parameters for the
// API request.
//
// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException"
// The specified repository could not be found. Check the spelling of the specified
// repository and ensure that you are performing operations on the correct registry.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/PutLifecyclePolicy
func (c *ECR) PutLifecyclePolicy(input *PutLifecyclePolicyInput) (*PutLifecyclePolicyOutput, error) {
req, out := c.PutLifecyclePolicyRequest(input)
return out, req.Send()
}
// PutLifecyclePolicyWithContext is the same as PutLifecyclePolicy with the addition of
// the ability to pass a context and additional request options.
//
// See PutLifecyclePolicy for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ECR) PutLifecyclePolicyWithContext(ctx aws.Context, input *PutLifecyclePolicyInput, opts ...request.Option) (*PutLifecyclePolicyOutput, error) {
req, out := c.PutLifecyclePolicyRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opSetRepositoryPolicy = "SetRepositoryPolicy"
// SetRepositoryPolicyRequest generates a "aws/request.Request" representing the
// client's request for the SetRepositoryPolicy operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See SetRepositoryPolicy for more information on using the SetRepositoryPolicy
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the SetRepositoryPolicyRequest method.
// req, resp := client.SetRepositoryPolicyRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/SetRepositoryPolicy
func (c *ECR) SetRepositoryPolicyRequest(input *SetRepositoryPolicyInput) (req *request.Request, output *SetRepositoryPolicyOutput) {
op := &request.Operation{
Name: opSetRepositoryPolicy,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &SetRepositoryPolicyInput{}
}
output = &SetRepositoryPolicyOutput{}
req = c.newRequest(op, input, output)
return
}
// SetRepositoryPolicy API operation for Amazon EC2 Container Registry.
//
// Applies a repository policy on a specified repository to control access permissions.
// For more information, see Amazon ECR Repository Policies (https://docs.aws.amazon.com/AmazonECR/latest/userguide/RepositoryPolicies.html)
// in the Amazon Elastic Container Registry User Guide.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon EC2 Container Registry's
// API operation SetRepositoryPolicy for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServerException "ServerException"
// These errors are usually caused by a server-side issue.
//
// * ErrCodeInvalidParameterException "InvalidParameterException"
// The specified parameter is invalid. Review the available parameters for the
// API request.
//
// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException"
// The specified repository could not be found. Check the spelling of the specified
// repository and ensure that you are performing operations on the correct registry.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/SetRepositoryPolicy
func (c *ECR) SetRepositoryPolicy(input *SetRepositoryPolicyInput) (*SetRepositoryPolicyOutput, error) {
req, out := c.SetRepositoryPolicyRequest(input)
return out, req.Send()
}
// SetRepositoryPolicyWithContext is the same as SetRepositoryPolicy with the addition of
// the ability to pass a context and additional request options.
//
// See SetRepositoryPolicy for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ECR) SetRepositoryPolicyWithContext(ctx aws.Context, input *SetRepositoryPolicyInput, opts ...request.Option) (*SetRepositoryPolicyOutput, error) {
req, out := c.SetRepositoryPolicyRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opStartLifecyclePolicyPreview = "StartLifecyclePolicyPreview"
// StartLifecyclePolicyPreviewRequest generates a "aws/request.Request" representing the
// client's request for the StartLifecyclePolicyPreview operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See StartLifecyclePolicyPreview for more information on using the StartLifecyclePolicyPreview
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the StartLifecyclePolicyPreviewRequest method.
// req, resp := client.StartLifecyclePolicyPreviewRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/StartLifecyclePolicyPreview
func (c *ECR) StartLifecyclePolicyPreviewRequest(input *StartLifecyclePolicyPreviewInput) (req *request.Request, output *StartLifecyclePolicyPreviewOutput) {
op := &request.Operation{
Name: opStartLifecyclePolicyPreview,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &StartLifecyclePolicyPreviewInput{}
}
output = &StartLifecyclePolicyPreviewOutput{}
req = c.newRequest(op, input, output)
return
}
// StartLifecyclePolicyPreview API operation for Amazon EC2 Container Registry.
//
// Starts a preview of the specified lifecycle policy. This allows you to see
// the results before creating the lifecycle policy.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon EC2 Container Registry's
// API operation StartLifecyclePolicyPreview for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServerException "ServerException"
// These errors are usually caused by a server-side issue.
//
// * ErrCodeInvalidParameterException "InvalidParameterException"
// The specified parameter is invalid. Review the available parameters for the
// API request.
//
// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException"
// The specified repository could not be found. Check the spelling of the specified
// repository and ensure that you are performing operations on the correct registry.
//
// * ErrCodeLifecyclePolicyNotFoundException "LifecyclePolicyNotFoundException"
// The lifecycle policy could not be found, and no policy is set to the repository.
//
// * ErrCodeLifecyclePolicyPreviewInProgressException "LifecyclePolicyPreviewInProgressException"
// The previous lifecycle policy preview request has not completed. Please try
// again later.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/StartLifecyclePolicyPreview
func (c *ECR) StartLifecyclePolicyPreview(input *StartLifecyclePolicyPreviewInput) (*StartLifecyclePolicyPreviewOutput, error) {
req, out := c.StartLifecyclePolicyPreviewRequest(input)
return out, req.Send()
}
// StartLifecyclePolicyPreviewWithContext is the same as StartLifecyclePolicyPreview with the addition of
// the ability to pass a context and additional request options.
//
// See StartLifecyclePolicyPreview for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ECR) StartLifecyclePolicyPreviewWithContext(ctx aws.Context, input *StartLifecyclePolicyPreviewInput, opts ...request.Option) (*StartLifecyclePolicyPreviewOutput, error) {
req, out := c.StartLifecyclePolicyPreviewRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opTagResource = "TagResource"
// TagResourceRequest generates a "aws/request.Request" representing the
// client's request for the TagResource operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See TagResource for more information on using the TagResource
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the TagResourceRequest method.
// req, resp := client.TagResourceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/TagResource
func (c *ECR) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) {
op := &request.Operation{
Name: opTagResource,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &TagResourceInput{}
}
output = &TagResourceOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// TagResource API operation for Amazon EC2 Container Registry.
//
// Adds specified tags to a resource with the specified ARN. Existing tags on
// a resource are not changed if they are not specified in the request parameters.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon EC2 Container Registry's
// API operation TagResource for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidParameterException "InvalidParameterException"
// The specified parameter is invalid. Review the available parameters for the
// API request.
//
// * ErrCodeInvalidTagParameterException "InvalidTagParameterException"
// An invalid parameter has been specified. Tag keys can have a maximum character
// length of 128 characters, and tag values can have a maximum length of 256
// characters.
//
// * ErrCodeTooManyTagsException "TooManyTagsException"
// The list of tags on the repository is over the limit. The maximum number
// of tags that can be applied to a repository is 50.
//
// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException"
// The specified repository could not be found. Check the spelling of the specified
// repository and ensure that you are performing operations on the correct registry.
//
// * ErrCodeServerException "ServerException"
// These errors are usually caused by a server-side issue.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/TagResource
func (c *ECR) TagResource(input *TagResourceInput) (*TagResourceOutput, error) {
req, out := c.TagResourceRequest(input)
return out, req.Send()
}
// TagResourceWithContext is the same as TagResource with the addition of
// the ability to pass a context and additional request options.
//
// See TagResource for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ECR) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) {
req, out := c.TagResourceRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opUntagResource = "UntagResource"
// UntagResourceRequest generates a "aws/request.Request" representing the
// client's request for the UntagResource operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See UntagResource for more information on using the UntagResource
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the UntagResourceRequest method.
// req, resp := client.UntagResourceRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/UntagResource
func (c *ECR) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) {
op := &request.Operation{
Name: opUntagResource,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &UntagResourceInput{}
}
output = &UntagResourceOutput{}
req = c.newRequest(op, input, output)
req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
return
}
// UntagResource API operation for Amazon EC2 Container Registry.
//
// Deletes specified tags from a resource.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon EC2 Container Registry's
// API operation UntagResource for usage and error information.
//
// Returned Error Codes:
// * ErrCodeInvalidParameterException "InvalidParameterException"
// The specified parameter is invalid. Review the available parameters for the
// API request.
//
// * ErrCodeInvalidTagParameterException "InvalidTagParameterException"
// An invalid parameter has been specified. Tag keys can have a maximum character
// length of 128 characters, and tag values can have a maximum length of 256
// characters.
//
// * ErrCodeTooManyTagsException "TooManyTagsException"
// The list of tags on the repository is over the limit. The maximum number
// of tags that can be applied to a repository is 50.
//
// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException"
// The specified repository could not be found. Check the spelling of the specified
// repository and ensure that you are performing operations on the correct registry.
//
// * ErrCodeServerException "ServerException"
// These errors are usually caused by a server-side issue.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/UntagResource
func (c *ECR) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) {
req, out := c.UntagResourceRequest(input)
return out, req.Send()
}
// UntagResourceWithContext is the same as UntagResource with the addition of
// the ability to pass a context and additional request options.
//
// See UntagResource for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ECR) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) {
req, out := c.UntagResourceRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
const opUploadLayerPart = "UploadLayerPart"
// UploadLayerPartRequest generates a "aws/request.Request" representing the
// client's request for the UploadLayerPart operation. The "output" return
// value will be populated with the request's response once the request completes
// successfully.
//
// Use "Send" method on the returned Request to send the API call to the service.
// the "output" return value is not valid until after Send returns without error.
//
// See UploadLayerPart for more information on using the UploadLayerPart
// API call, and error handling.
//
// This method is useful when you want to inject custom logic or configuration
// into the SDK's request lifecycle. Such as custom headers, or retry logic.
//
//
// // Example sending a request using the UploadLayerPartRequest method.
// req, resp := client.UploadLayerPartRequest(params)
//
// err := req.Send()
// if err == nil { // resp is now filled
// fmt.Println(resp)
// }
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/UploadLayerPart
func (c *ECR) UploadLayerPartRequest(input *UploadLayerPartInput) (req *request.Request, output *UploadLayerPartOutput) {
op := &request.Operation{
Name: opUploadLayerPart,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &UploadLayerPartInput{}
}
output = &UploadLayerPartOutput{}
req = c.newRequest(op, input, output)
return
}
// UploadLayerPart API operation for Amazon EC2 Container Registry.
//
// Uploads an image layer part to Amazon ECR.
//
// This operation is used by the Amazon ECR proxy, and it is not intended for
// general use by customers for pulling and pushing images. In most cases, you
// should use the docker CLI to pull, tag, and push images.
//
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
// with awserr.Error's Code and Message methods to get detailed information about
// the error.
//
// See the AWS API reference guide for Amazon EC2 Container Registry's
// API operation UploadLayerPart for usage and error information.
//
// Returned Error Codes:
// * ErrCodeServerException "ServerException"
// These errors are usually caused by a server-side issue.
//
// * ErrCodeInvalidParameterException "InvalidParameterException"
// The specified parameter is invalid. Review the available parameters for the
// API request.
//
// * ErrCodeInvalidLayerPartException "InvalidLayerPartException"
// The layer part size is not valid, or the first byte specified is not consecutive
// to the last byte of a previous layer part upload.
//
// * ErrCodeRepositoryNotFoundException "RepositoryNotFoundException"
// The specified repository could not be found. Check the spelling of the specified
// repository and ensure that you are performing operations on the correct registry.
//
// * ErrCodeUploadNotFoundException "UploadNotFoundException"
// The upload could not be found, or the specified upload id is not valid for
// this repository.
//
// * ErrCodeLimitExceededException "LimitExceededException"
// The operation did not succeed because it would have exceeded a service limit
// for your account. For more information, see Amazon ECR Default Service Limits
// (https://docs.aws.amazon.com/AmazonECR/latest/userguide/service_limits.html)
// in the Amazon Elastic Container Registry User Guide.
//
// See also, https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/UploadLayerPart
func (c *ECR) UploadLayerPart(input *UploadLayerPartInput) (*UploadLayerPartOutput, error) {
req, out := c.UploadLayerPartRequest(input)
return out, req.Send()
}
// UploadLayerPartWithContext is the same as UploadLayerPart with the addition of
// the ability to pass a context and additional request options.
//
// See UploadLayerPart for details on how to use this API operation.
//
// The context must be non-nil and will be used for request cancellation. If
// the context is nil a panic will occur. In the future the SDK may create
// sub-contexts for http.Requests. See https://golang.org/pkg/context/
// for more information on using Contexts.
func (c *ECR) UploadLayerPartWithContext(ctx aws.Context, input *UploadLayerPartInput, opts ...request.Option) (*UploadLayerPartOutput, error) {
req, out := c.UploadLayerPartRequest(input)
req.SetContext(ctx)
req.ApplyOptions(opts...)
return out, req.Send()
}
// An object representing authorization data for an Amazon ECR registry.
type AuthorizationData struct {
_ struct{} `type:"structure"`
// A base64-encoded string that contains authorization data for the specified
// Amazon ECR registry. When the string is decoded, it is presented in the format
// user:password for private registry authentication using docker login.
AuthorizationToken *string `locationName:"authorizationToken" type:"string"`
// The Unix time in seconds and milliseconds when the authorization token expires.
// Authorization tokens are valid for 12 hours.
ExpiresAt *time.Time `locationName:"expiresAt" type:"timestamp"`
// The registry URL to use for this authorization token in a docker login command.
// The Amazon ECR registry URL format is https://aws_account_id.dkr.ecr.region.amazonaws.com.
// For example, https://012345678910.dkr.ecr.us-east-1.amazonaws.com..
ProxyEndpoint *string `locationName:"proxyEndpoint" type:"string"`
}
// String returns the string representation
func (s AuthorizationData) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s AuthorizationData) GoString() string {
return s.String()
}
// SetAuthorizationToken sets the AuthorizationToken field's value.
func (s *AuthorizationData) SetAuthorizationToken(v string) *AuthorizationData {
s.AuthorizationToken = &v
return s
}
// SetExpiresAt sets the ExpiresAt field's value.
func (s *AuthorizationData) SetExpiresAt(v time.Time) *AuthorizationData {
s.ExpiresAt = &v
return s
}
// SetProxyEndpoint sets the ProxyEndpoint field's value.
func (s *AuthorizationData) SetProxyEndpoint(v string) *AuthorizationData {
s.ProxyEndpoint = &v
return s
}
type BatchCheckLayerAvailabilityInput struct {
_ struct{} `type:"structure"`
// The digests of the image layers to check.
//
// LayerDigests is a required field
LayerDigests []*string `locationName:"layerDigests" min:"1" type:"list" required:"true"`
// The AWS account ID associated with the registry that contains the image layers
// to check. If you do not specify a registry, the default registry is assumed.
RegistryId *string `locationName:"registryId" type:"string"`
// The name of the repository that is associated with the image layers to check.
//
// RepositoryName is a required field
RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
}
// String returns the string representation
func (s BatchCheckLayerAvailabilityInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s BatchCheckLayerAvailabilityInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *BatchCheckLayerAvailabilityInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "BatchCheckLayerAvailabilityInput"}
if s.LayerDigests == nil {
invalidParams.Add(request.NewErrParamRequired("LayerDigests"))
}
if s.LayerDigests != nil && len(s.LayerDigests) < 1 {
invalidParams.Add(request.NewErrParamMinLen("LayerDigests", 1))
}
if s.RepositoryName == nil {
invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
}
if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetLayerDigests sets the LayerDigests field's value.
func (s *BatchCheckLayerAvailabilityInput) SetLayerDigests(v []*string) *BatchCheckLayerAvailabilityInput {
s.LayerDigests = v
return s
}
// SetRegistryId sets the RegistryId field's value.
func (s *BatchCheckLayerAvailabilityInput) SetRegistryId(v string) *BatchCheckLayerAvailabilityInput {
s.RegistryId = &v
return s
}
// SetRepositoryName sets the RepositoryName field's value.
func (s *BatchCheckLayerAvailabilityInput) SetRepositoryName(v string) *BatchCheckLayerAvailabilityInput {
s.RepositoryName = &v
return s
}
type BatchCheckLayerAvailabilityOutput struct {
_ struct{} `type:"structure"`
// Any failures associated with the call.
Failures []*LayerFailure `locationName:"failures" type:"list"`
// A list of image layer objects corresponding to the image layer references
// in the request.
Layers []*Layer `locationName:"layers" type:"list"`
}
// String returns the string representation
func (s BatchCheckLayerAvailabilityOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s BatchCheckLayerAvailabilityOutput) GoString() string {
return s.String()
}
// SetFailures sets the Failures field's value.
func (s *BatchCheckLayerAvailabilityOutput) SetFailures(v []*LayerFailure) *BatchCheckLayerAvailabilityOutput {
s.Failures = v
return s
}
// SetLayers sets the Layers field's value.
func (s *BatchCheckLayerAvailabilityOutput) SetLayers(v []*Layer) *BatchCheckLayerAvailabilityOutput {
s.Layers = v
return s
}
// Deletes specified images within a specified repository. Images are specified
// with either the imageTag or imageDigest.
type BatchDeleteImageInput struct {
_ struct{} `type:"structure"`
// A list of image ID references that correspond to images to delete. The format
// of the imageIds reference is imageTag=tag or imageDigest=digest.
//
// ImageIds is a required field
ImageIds []*ImageIdentifier `locationName:"imageIds" min:"1" type:"list" required:"true"`
// The AWS account ID associated with the registry that contains the image to
// delete. If you do not specify a registry, the default registry is assumed.
RegistryId *string `locationName:"registryId" type:"string"`
// The repository that contains the image to delete.
//
// RepositoryName is a required field
RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
}
// String returns the string representation
func (s BatchDeleteImageInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s BatchDeleteImageInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *BatchDeleteImageInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "BatchDeleteImageInput"}
if s.ImageIds == nil {
invalidParams.Add(request.NewErrParamRequired("ImageIds"))
}
if s.ImageIds != nil && len(s.ImageIds) < 1 {
invalidParams.Add(request.NewErrParamMinLen("ImageIds", 1))
}
if s.RepositoryName == nil {
invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
}
if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
}
if s.ImageIds != nil {
for i, v := range s.ImageIds {
if v == nil {
continue
}
if err := v.Validate(); err != nil {
invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ImageIds", i), err.(request.ErrInvalidParams))
}
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetImageIds sets the ImageIds field's value.
func (s *BatchDeleteImageInput) SetImageIds(v []*ImageIdentifier) *BatchDeleteImageInput {
s.ImageIds = v
return s
}
// SetRegistryId sets the RegistryId field's value.
func (s *BatchDeleteImageInput) SetRegistryId(v string) *BatchDeleteImageInput {
s.RegistryId = &v
return s
}
// SetRepositoryName sets the RepositoryName field's value.
func (s *BatchDeleteImageInput) SetRepositoryName(v string) *BatchDeleteImageInput {
s.RepositoryName = &v
return s
}
type BatchDeleteImageOutput struct {
_ struct{} `type:"structure"`
// Any failures associated with the call.
Failures []*ImageFailure `locationName:"failures" type:"list"`
// The image IDs of the deleted images.
ImageIds []*ImageIdentifier `locationName:"imageIds" min:"1" type:"list"`
}
// String returns the string representation
func (s BatchDeleteImageOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s BatchDeleteImageOutput) GoString() string {
return s.String()
}
// SetFailures sets the Failures field's value.
func (s *BatchDeleteImageOutput) SetFailures(v []*ImageFailure) *BatchDeleteImageOutput {
s.Failures = v
return s
}
// SetImageIds sets the ImageIds field's value.
func (s *BatchDeleteImageOutput) SetImageIds(v []*ImageIdentifier) *BatchDeleteImageOutput {
s.ImageIds = v
return s
}
type BatchGetImageInput struct {
_ struct{} `type:"structure"`
// The accepted media types for the request.
//
// Valid values: application/vnd.docker.distribution.manifest.v1+json | application/vnd.docker.distribution.manifest.v2+json
// | application/vnd.oci.image.manifest.v1+json
AcceptedMediaTypes []*string `locationName:"acceptedMediaTypes" min:"1" type:"list"`
// A list of image ID references that correspond to images to describe. The
// format of the imageIds reference is imageTag=tag or imageDigest=digest.
//
// ImageIds is a required field
ImageIds []*ImageIdentifier `locationName:"imageIds" min:"1" type:"list" required:"true"`
// The AWS account ID associated with the registry that contains the images
// to describe. If you do not specify a registry, the default registry is assumed.
RegistryId *string `locationName:"registryId" type:"string"`
// The repository that contains the images to describe.
//
// RepositoryName is a required field
RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
}
// String returns the string representation
func (s BatchGetImageInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s BatchGetImageInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *BatchGetImageInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "BatchGetImageInput"}
if s.AcceptedMediaTypes != nil && len(s.AcceptedMediaTypes) < 1 {
invalidParams.Add(request.NewErrParamMinLen("AcceptedMediaTypes", 1))
}
if s.ImageIds == nil {
invalidParams.Add(request.NewErrParamRequired("ImageIds"))
}
if s.ImageIds != nil && len(s.ImageIds) < 1 {
invalidParams.Add(request.NewErrParamMinLen("ImageIds", 1))
}
if s.RepositoryName == nil {
invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
}
if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
}
if s.ImageIds != nil {
for i, v := range s.ImageIds {
if v == nil {
continue
}
if err := v.Validate(); err != nil {
invalidParams.AddNested(fmt.Sprintf("%s[%v]", "ImageIds", i), err.(request.ErrInvalidParams))
}
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetAcceptedMediaTypes sets the AcceptedMediaTypes field's value.
func (s *BatchGetImageInput) SetAcceptedMediaTypes(v []*string) *BatchGetImageInput {
s.AcceptedMediaTypes = v
return s
}
// SetImageIds sets the ImageIds field's value.
func (s *BatchGetImageInput) SetImageIds(v []*ImageIdentifier) *BatchGetImageInput {
s.ImageIds = v
return s
}
// SetRegistryId sets the RegistryId field's value.
func (s *BatchGetImageInput) SetRegistryId(v string) *BatchGetImageInput {
s.RegistryId = &v
return s
}
// SetRepositoryName sets the RepositoryName field's value.
func (s *BatchGetImageInput) SetRepositoryName(v string) *BatchGetImageInput {
s.RepositoryName = &v
return s
}
type BatchGetImageOutput struct {
_ struct{} `type:"structure"`
// Any failures associated with the call.
Failures []*ImageFailure `locationName:"failures" type:"list"`
// A list of image objects corresponding to the image references in the request.
Images []*Image `locationName:"images" type:"list"`
}
// String returns the string representation
func (s BatchGetImageOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s BatchGetImageOutput) GoString() string {
return s.String()
}
// SetFailures sets the Failures field's value.
func (s *BatchGetImageOutput) SetFailures(v []*ImageFailure) *BatchGetImageOutput {
s.Failures = v
return s
}
// SetImages sets the Images field's value.
func (s *BatchGetImageOutput) SetImages(v []*Image) *BatchGetImageOutput {
s.Images = v
return s
}
type CompleteLayerUploadInput struct {
_ struct{} `type:"structure"`
// The sha256 digest of the image layer.
//
// LayerDigests is a required field
LayerDigests []*string `locationName:"layerDigests" min:"1" type:"list" required:"true"`
// The AWS account ID associated with the registry to which to upload layers.
// If you do not specify a registry, the default registry is assumed.
RegistryId *string `locationName:"registryId" type:"string"`
// The name of the repository to associate with the image layer.
//
// RepositoryName is a required field
RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
// The upload ID from a previous InitiateLayerUpload operation to associate
// with the image layer.
//
// UploadId is a required field
UploadId *string `locationName:"uploadId" type:"string" required:"true"`
}
// String returns the string representation
func (s CompleteLayerUploadInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CompleteLayerUploadInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *CompleteLayerUploadInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "CompleteLayerUploadInput"}
if s.LayerDigests == nil {
invalidParams.Add(request.NewErrParamRequired("LayerDigests"))
}
if s.LayerDigests != nil && len(s.LayerDigests) < 1 {
invalidParams.Add(request.NewErrParamMinLen("LayerDigests", 1))
}
if s.RepositoryName == nil {
invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
}
if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
}
if s.UploadId == nil {
invalidParams.Add(request.NewErrParamRequired("UploadId"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetLayerDigests sets the LayerDigests field's value.
func (s *CompleteLayerUploadInput) SetLayerDigests(v []*string) *CompleteLayerUploadInput {
s.LayerDigests = v
return s
}
// SetRegistryId sets the RegistryId field's value.
func (s *CompleteLayerUploadInput) SetRegistryId(v string) *CompleteLayerUploadInput {
s.RegistryId = &v
return s
}
// SetRepositoryName sets the RepositoryName field's value.
func (s *CompleteLayerUploadInput) SetRepositoryName(v string) *CompleteLayerUploadInput {
s.RepositoryName = &v
return s
}
// SetUploadId sets the UploadId field's value.
func (s *CompleteLayerUploadInput) SetUploadId(v string) *CompleteLayerUploadInput {
s.UploadId = &v
return s
}
type CompleteLayerUploadOutput struct {
_ struct{} `type:"structure"`
// The sha256 digest of the image layer.
LayerDigest *string `locationName:"layerDigest" type:"string"`
// The registry ID associated with the request.
RegistryId *string `locationName:"registryId" type:"string"`
// The repository name associated with the request.
RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"`
// The upload ID associated with the layer.
UploadId *string `locationName:"uploadId" type:"string"`
}
// String returns the string representation
func (s CompleteLayerUploadOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CompleteLayerUploadOutput) GoString() string {
return s.String()
}
// SetLayerDigest sets the LayerDigest field's value.
func (s *CompleteLayerUploadOutput) SetLayerDigest(v string) *CompleteLayerUploadOutput {
s.LayerDigest = &v
return s
}
// SetRegistryId sets the RegistryId field's value.
func (s *CompleteLayerUploadOutput) SetRegistryId(v string) *CompleteLayerUploadOutput {
s.RegistryId = &v
return s
}
// SetRepositoryName sets the RepositoryName field's value.
func (s *CompleteLayerUploadOutput) SetRepositoryName(v string) *CompleteLayerUploadOutput {
s.RepositoryName = &v
return s
}
// SetUploadId sets the UploadId field's value.
func (s *CompleteLayerUploadOutput) SetUploadId(v string) *CompleteLayerUploadOutput {
s.UploadId = &v
return s
}
type CreateRepositoryInput struct {
_ struct{} `type:"structure"`
// The tag mutability setting for the repository. If this parameter is omitted,
// the default setting of MUTABLE will be used which will allow image tags to
// be overwritten. If IMMUTABLE is specified, all image tags within the repository
// will be immutable which will prevent them from being overwritten.
ImageTagMutability *string `locationName:"imageTagMutability" type:"string" enum:"ImageTagMutability"`
// The name to use for the repository. The repository name may be specified
// on its own (such as nginx-web-app) or it can be prepended with a namespace
// to group the repository into a category (such as project-a/nginx-web-app).
//
// RepositoryName is a required field
RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
// The metadata that you apply to the repository to help you categorize and
// organize them. Each tag consists of a key and an optional value, both of
// which you define. Tag keys can have a maximum character length of 128 characters,
// and tag values can have a maximum length of 256 characters.
Tags []*Tag `locationName:"tags" type:"list"`
}
// String returns the string representation
func (s CreateRepositoryInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateRepositoryInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *CreateRepositoryInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "CreateRepositoryInput"}
if s.RepositoryName == nil {
invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
}
if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetImageTagMutability sets the ImageTagMutability field's value.
func (s *CreateRepositoryInput) SetImageTagMutability(v string) *CreateRepositoryInput {
s.ImageTagMutability = &v
return s
}
// SetRepositoryName sets the RepositoryName field's value.
func (s *CreateRepositoryInput) SetRepositoryName(v string) *CreateRepositoryInput {
s.RepositoryName = &v
return s
}
// SetTags sets the Tags field's value.
func (s *CreateRepositoryInput) SetTags(v []*Tag) *CreateRepositoryInput {
s.Tags = v
return s
}
type CreateRepositoryOutput struct {
_ struct{} `type:"structure"`
// The repository that was created.
Repository *Repository `locationName:"repository" type:"structure"`
}
// String returns the string representation
func (s CreateRepositoryOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateRepositoryOutput) GoString() string {
return s.String()
}
// SetRepository sets the Repository field's value.
func (s *CreateRepositoryOutput) SetRepository(v *Repository) *CreateRepositoryOutput {
s.Repository = v
return s
}
type DeleteLifecyclePolicyInput struct {
_ struct{} `type:"structure"`
// The AWS account ID associated with the registry that contains the repository.
// If you do not specify a registry, the default registry is assumed.
RegistryId *string `locationName:"registryId" type:"string"`
// The name of the repository.
//
// RepositoryName is a required field
RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
}
// String returns the string representation
func (s DeleteLifecyclePolicyInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteLifecyclePolicyInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DeleteLifecyclePolicyInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DeleteLifecyclePolicyInput"}
if s.RepositoryName == nil {
invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
}
if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetRegistryId sets the RegistryId field's value.
func (s *DeleteLifecyclePolicyInput) SetRegistryId(v string) *DeleteLifecyclePolicyInput {
s.RegistryId = &v
return s
}
// SetRepositoryName sets the RepositoryName field's value.
func (s *DeleteLifecyclePolicyInput) SetRepositoryName(v string) *DeleteLifecyclePolicyInput {
s.RepositoryName = &v
return s
}
type DeleteLifecyclePolicyOutput struct {
_ struct{} `type:"structure"`
// The time stamp of the last time that the lifecycle policy was run.
LastEvaluatedAt *time.Time `locationName:"lastEvaluatedAt" type:"timestamp"`
// The JSON lifecycle policy text.
LifecyclePolicyText *string `locationName:"lifecyclePolicyText" min:"100" type:"string"`
// The registry ID associated with the request.
RegistryId *string `locationName:"registryId" type:"string"`
// The repository name associated with the request.
RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"`
}
// String returns the string representation
func (s DeleteLifecyclePolicyOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteLifecyclePolicyOutput) GoString() string {
return s.String()
}
// SetLastEvaluatedAt sets the LastEvaluatedAt field's value.
func (s *DeleteLifecyclePolicyOutput) SetLastEvaluatedAt(v time.Time) *DeleteLifecyclePolicyOutput {
s.LastEvaluatedAt = &v
return s
}
// SetLifecyclePolicyText sets the LifecyclePolicyText field's value.
func (s *DeleteLifecyclePolicyOutput) SetLifecyclePolicyText(v string) *DeleteLifecyclePolicyOutput {
s.LifecyclePolicyText = &v
return s
}
// SetRegistryId sets the RegistryId field's value.
func (s *DeleteLifecyclePolicyOutput) SetRegistryId(v string) *DeleteLifecyclePolicyOutput {
s.RegistryId = &v
return s
}
// SetRepositoryName sets the RepositoryName field's value.
func (s *DeleteLifecyclePolicyOutput) SetRepositoryName(v string) *DeleteLifecyclePolicyOutput {
s.RepositoryName = &v
return s
}
type DeleteRepositoryInput struct {
_ struct{} `type:"structure"`
// If a repository contains images, forces the deletion.
Force *bool `locationName:"force" type:"boolean"`
// The AWS account ID associated with the registry that contains the repository
// to delete. If you do not specify a registry, the default registry is assumed.
RegistryId *string `locationName:"registryId" type:"string"`
// The name of the repository to delete.
//
// RepositoryName is a required field
RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
}
// String returns the string representation
func (s DeleteRepositoryInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteRepositoryInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DeleteRepositoryInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DeleteRepositoryInput"}
if s.RepositoryName == nil {
invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
}
if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetForce sets the Force field's value.
func (s *DeleteRepositoryInput) SetForce(v bool) *DeleteRepositoryInput {
s.Force = &v
return s
}
// SetRegistryId sets the RegistryId field's value.
func (s *DeleteRepositoryInput) SetRegistryId(v string) *DeleteRepositoryInput {
s.RegistryId = &v
return s
}
// SetRepositoryName sets the RepositoryName field's value.
func (s *DeleteRepositoryInput) SetRepositoryName(v string) *DeleteRepositoryInput {
s.RepositoryName = &v
return s
}
type DeleteRepositoryOutput struct {
_ struct{} `type:"structure"`
// The repository that was deleted.
Repository *Repository `locationName:"repository" type:"structure"`
}
// String returns the string representation
func (s DeleteRepositoryOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteRepositoryOutput) GoString() string {
return s.String()
}
// SetRepository sets the Repository field's value.
func (s *DeleteRepositoryOutput) SetRepository(v *Repository) *DeleteRepositoryOutput {
s.Repository = v
return s
}
type DeleteRepositoryPolicyInput struct {
_ struct{} `type:"structure"`
// The AWS account ID associated with the registry that contains the repository
// policy to delete. If you do not specify a registry, the default registry
// is assumed.
RegistryId *string `locationName:"registryId" type:"string"`
// The name of the repository that is associated with the repository policy
// to delete.
//
// RepositoryName is a required field
RepositoryName *string `locationName:"repositoryName" min:"2" type:"string" required:"true"`
}
// String returns the string representation
func (s DeleteRepositoryPolicyInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteRepositoryPolicyInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DeleteRepositoryPolicyInput) Validate() error {
invalidParams := request.ErrInvalidParams{Context: "DeleteRepositoryPolicyInput"}
if s.RepositoryName == nil {
invalidParams.Add(request.NewErrParamRequired("RepositoryName"))
}
if s.RepositoryName != nil && len(*s.RepositoryName) < 2 {
invalidParams.Add(request.NewErrParamMinLen("RepositoryName", 2))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// SetRegistryId sets the RegistryId field's value.
func (s *DeleteRepositoryPolicyInput) SetRegistryId(v string) *DeleteRepositoryPolicyInput {
s.RegistryId = &v
return s
}
// SetRepositoryName sets the RepositoryName field's value.
func (s *DeleteRepositoryPolicyInput) SetRepositoryName(v string) *DeleteRepositoryPolicyInput {
s.RepositoryName = &v
return s
}
type DeleteRepositoryPolicyOutput struct {
_ struct{} `type:"structure"`
// The JSON repository policy that was deleted from the repository.
PolicyText *string `locationName:"policyText" type:"string"`
// The registry ID associated with the request.
RegistryId *string `locationName:"registryId" type:"string"`
// The repository name associated with the request.
RepositoryName *string `locationName:"repositoryName" min:"2" type:"string"`
}
// String returns the string representation
func (s DeleteRepositoryPolicyOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteRepositoryPolicyOutput) GoString() string {
return s.String()
}
// SetPolicyText sets the PolicyText field's value.
func (s *DeleteRepositoryPolicyOutput) SetPolicyText(v string) *DeleteRepositoryPolicyOutput {
s.PolicyText = &v
return s
}
// SetRegistryId sets the RegistryId field's value.
func (s *DeleteRepositoryPolicyOutput) SetRegistryId(v string) *DeleteRepositoryPolicyOutput {
s.RegistryId = &v
return s
}
// SetRepositoryName sets the RepositoryName field's value.
func (s *DeleteRepositoryPolicyOutput) SetRepositoryName(v string) *DeleteRepositoryPolicyOutput {
s.RepositoryName = &v
return s
}
// An object representing a filter on a DescribeImages operation.
type DescribeImagesFilter struct {
_ struct{} `type:"structure"`
// The tag status with which to filter your DescribeImages results. You can
// filter results based on whether they are TAGGED or UNTAGGED.
TagStatus *string `locationName:"tagStatus" type:"string" enum:"TagStatus"`
}
// String returns the string representation
func (s DescribeImagesFilter) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DescribeImagesFilter) GoString() string {
return s.String()
}
// SetTagStatus sets the TagStatus field's value.
func (s *DescribeImagesFilter) SetTagStatus(v string) *DescribeImagesFilter {
s.TagStatus = &v
return s
}
type DescribeImagesInput struct {
_ struct{} `type:"structure"`
// The filter key and value with which to filter your DescribeImages results.
Filter *DescribeImagesFilter `locationName:"filter" type:"structure"`
// The list of image IDs for the requested repository.
ImageIds []*ImageIdentifier `locationName:"imageIds" min:"1" type:"list"`
// The maximum number of repository results returned by DescribeImages in paginated
// output. When this parameter is used, DescribeImages only returns maxResults
// results in a single page along with a nextToken response element. The remaining
// results of the initial request can be seen by sending another DescribeImages
// request with the returned nextToken value. This value can be between 1 and
// 1000. If this parameter is not used, then DescribeImages returns up to 100
// results and a nextToken value, if applicable.