AWS SDK for Go (PILOT)
API Reference

PREVIEW DOCUMENTATION - This is a preview of a new format for the AWS SDK for Go API Reference documentation. For the current AWS SDK for Go API Reference, see https://docs.aws.amazon.com/sdk-for-go/api/.

We welcome your feedback on this new version of the documentation. Send your comments to aws-sdkdocs-feedback@amazon.com.

ECR

import "github.com/aws/aws-sdk-go/service/ecr"

type ECR struct { *client.Client }

ECR provides the API operation methods for making requests to Amazon EC2 Container Registry. See this package's package overview docs for details on the service.

ECR methods are safe to use concurrently. It is not safe to modify mutate any of the struct's properties though.

Client

Type: *client.Client

Method

BatchCheckLayerAvailability

func (c *ECR) BatchCheckLayerAvailability(input *BatchCheckLayerAvailabilityInput) (*BatchCheckLayerAvailabilityOutput, error)

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

BatchCheckLayerAvailabilityRequest

func (c *ECR) BatchCheckLayerAvailabilityRequest(input *BatchCheckLayerAvailabilityInput) (req *request.Request, output *BatchCheckLayerAvailabilityOutput)

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

BatchCheckLayerAvailabilityWithContext

func (c *ECR) BatchCheckLayerAvailabilityWithContext(ctx aws.Context, input *BatchCheckLayerAvailabilityInput, opts ...request.Option) (*BatchCheckLayerAvailabilityOutput, error)

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.

See Also

For more information about using this API, see AWS API Documentation.

BatchDeleteImage

func (c *ECR) BatchDeleteImage(input *BatchDeleteImageInput) (*BatchDeleteImageOutput, error)

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

Example

ECR BatchDeleteImage shared00

To delete multiple images

This example deletes images with the tags precise and trusty in a repository called ubuntu in the default registry for an account.

{ svc := ecr.New(session.New()) input := &ecr.BatchDeleteImageInput{ ImageIds: []*ecr.ImageIdentifier{ { ImageTag: aws.String("precise"), }, }, RepositoryName: aws.String("ubuntu"), } result, err := svc.BatchDeleteImage(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case ecr.ErrCodeServerException: fmt.Println(ecr.ErrCodeServerException, aerr.Error()) case ecr.ErrCodeInvalidParameterException: fmt.Println(ecr.ErrCodeInvalidParameterException, aerr.Error()) case ecr.ErrCodeRepositoryNotFoundException: fmt.Println(ecr.ErrCodeRepositoryNotFoundException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

BatchDeleteImageRequest

func (c *ECR) BatchDeleteImageRequest(input *BatchDeleteImageInput) (req *request.Request, output *BatchDeleteImageOutput)

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

BatchDeleteImageWithContext

func (c *ECR) BatchDeleteImageWithContext(ctx aws.Context, input *BatchDeleteImageInput, opts ...request.Option) (*BatchDeleteImageOutput, error)

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.

See Also

For more information about using this API, see AWS API Documentation.

BatchGetImage

func (c *ECR) BatchGetImage(input *BatchGetImageInput) (*BatchGetImageOutput, error)

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

Example

ECR BatchGetImage shared00

To obtain multiple images in a single request

This example obtains information for an image with a specified image digest ID from the repository named ubuntu in the current account.

{ svc := ecr.New(session.New()) input := &ecr.BatchGetImageInput{ ImageIds: []*ecr.ImageIdentifier{ { ImageTag: aws.String("precise"), }, }, RepositoryName: aws.String("ubuntu"), } result, err := svc.BatchGetImage(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case ecr.ErrCodeServerException: fmt.Println(ecr.ErrCodeServerException, aerr.Error()) case ecr.ErrCodeInvalidParameterException: fmt.Println(ecr.ErrCodeInvalidParameterException, aerr.Error()) case ecr.ErrCodeRepositoryNotFoundException: fmt.Println(ecr.ErrCodeRepositoryNotFoundException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

BatchGetImageRequest

func (c *ECR) BatchGetImageRequest(input *BatchGetImageInput) (req *request.Request, output *BatchGetImageOutput)

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

BatchGetImageWithContext

func (c *ECR) BatchGetImageWithContext(ctx aws.Context, input *BatchGetImageInput, opts ...request.Option) (*BatchGetImageOutput, error)

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.

See Also

For more information about using this API, see AWS API Documentation.

CompleteLayerUpload

func (c *ECR) CompleteLayerUpload(input *CompleteLayerUploadInput) (*CompleteLayerUploadOutput, error)

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

CompleteLayerUploadRequest

func (c *ECR) CompleteLayerUploadRequest(input *CompleteLayerUploadInput) (req *request.Request, output *CompleteLayerUploadOutput)

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

CompleteLayerUploadWithContext

func (c *ECR) CompleteLayerUploadWithContext(ctx aws.Context, input *CompleteLayerUploadInput, opts ...request.Option) (*CompleteLayerUploadOutput, error)

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.

See Also

For more information about using this API, see AWS API Documentation.

CreateRepository

func (c *ECR) CreateRepository(input *CreateRepositoryInput) (*CreateRepositoryOutput, error)

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

(http://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

Example

ECR CreateRepository shared00

To create a new repository

This example creates a repository called nginx-web-app inside the project-a namespace in the default registry for an account.

{ svc := ecr.New(session.New()) input := &ecr.CreateRepositoryInput{ RepositoryName: aws.String("project-a/nginx-web-app"), } result, err := svc.CreateRepository(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case ecr.ErrCodeServerException: fmt.Println(ecr.ErrCodeServerException, aerr.Error()) case ecr.ErrCodeInvalidParameterException: fmt.Println(ecr.ErrCodeInvalidParameterException, aerr.Error()) case ecr.ErrCodeInvalidTagParameterException: fmt.Println(ecr.ErrCodeInvalidTagParameterException, aerr.Error()) case ecr.ErrCodeTooManyTagsException: fmt.Println(ecr.ErrCodeTooManyTagsException, aerr.Error()) case ecr.ErrCodeRepositoryAlreadyExistsException: fmt.Println(ecr.ErrCodeRepositoryAlreadyExistsException, aerr.Error()) case ecr.ErrCodeLimitExceededException: fmt.Println(ecr.ErrCodeLimitExceededException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

CreateRepositoryRequest

func (c *ECR) CreateRepositoryRequest(input *CreateRepositoryInput) (req *request.Request, output *CreateRepositoryOutput)

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

CreateRepositoryWithContext

func (c *ECR) CreateRepositoryWithContext(ctx aws.Context, input *CreateRepositoryInput, opts ...request.Option) (*CreateRepositoryOutput, error)

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.

See Also

For more information about using this API, see AWS API Documentation.

DeleteLifecyclePolicy

func (c *ECR) DeleteLifecyclePolicy(input *DeleteLifecyclePolicyInput) (*DeleteLifecyclePolicyOutput, error)

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

DeleteLifecyclePolicyRequest

func (c *ECR) DeleteLifecyclePolicyRequest(input *DeleteLifecyclePolicyInput) (req *request.Request, output *DeleteLifecyclePolicyOutput)

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

DeleteLifecyclePolicyWithContext

func (c *ECR) DeleteLifecyclePolicyWithContext(ctx aws.Context, input *DeleteLifecyclePolicyInput, opts ...request.Option) (*DeleteLifecyclePolicyOutput, error)

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.

See Also

For more information about using this API, see AWS API Documentation.

DeleteRepository

func (c *ECR) DeleteRepository(input *DeleteRepositoryInput) (*DeleteRepositoryOutput, error)

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

Example

ECR DeleteRepository shared00

To force delete a repository

This example force deletes a repository named ubuntu in the default registry for an account. The force parameter is required if the repository contains images.

{ svc := ecr.New(session.New()) input := &ecr.DeleteRepositoryInput{ Force: aws.Bool(true), RepositoryName: aws.String("ubuntu"), } result, err := svc.DeleteRepository(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case ecr.ErrCodeServerException: fmt.Println(ecr.ErrCodeServerException, aerr.Error()) case ecr.ErrCodeInvalidParameterException: fmt.Println(ecr.ErrCodeInvalidParameterException, aerr.Error()) case ecr.ErrCodeRepositoryNotFoundException: fmt.Println(ecr.ErrCodeRepositoryNotFoundException, aerr.Error()) case ecr.ErrCodeRepositoryNotEmptyException: fmt.Println(ecr.ErrCodeRepositoryNotEmptyException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

DeleteRepositoryPolicy

func (c *ECR) DeleteRepositoryPolicy(input *DeleteRepositoryPolicyInput) (*DeleteRepositoryPolicyOutput, error)

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

Example

ECR DeleteRepositoryPolicy shared00

To delete the policy associated with a repository

This example deletes the policy associated with the repository named ubuntu in the current account.

{ svc := ecr.New(session.New()) input := &ecr.DeleteRepositoryPolicyInput{ RepositoryName: aws.String("ubuntu"), } result, err := svc.DeleteRepositoryPolicy(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case ecr.ErrCodeServerException: fmt.Println(ecr.ErrCodeServerException, aerr.Error()) case ecr.ErrCodeInvalidParameterException: fmt.Println(ecr.ErrCodeInvalidParameterException, aerr.Error()) case ecr.ErrCodeRepositoryNotFoundException: fmt.Println(ecr.ErrCodeRepositoryNotFoundException, aerr.Error()) case ecr.ErrCodeRepositoryPolicyNotFoundException: fmt.Println(ecr.ErrCodeRepositoryPolicyNotFoundException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

DeleteRepositoryPolicyRequest

func (c *ECR) DeleteRepositoryPolicyRequest(input *DeleteRepositoryPolicyInput) (req *request.Request, output *DeleteRepositoryPolicyOutput)

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

DeleteRepositoryPolicyWithContext

func (c *ECR) DeleteRepositoryPolicyWithContext(ctx aws.Context, input *DeleteRepositoryPolicyInput, opts ...request.Option) (*DeleteRepositoryPolicyOutput, error)

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.

See Also

For more information about using this API, see AWS API Documentation.

DeleteRepositoryRequest

func (c *ECR) DeleteRepositoryRequest(input *DeleteRepositoryInput) (req *request.Request, output *DeleteRepositoryOutput)

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

DeleteRepositoryWithContext

func (c *ECR) DeleteRepositoryWithContext(ctx aws.Context, input *DeleteRepositoryInput, opts ...request.Option) (*DeleteRepositoryOutput, error)

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.

See Also

For more information about using this API, see AWS API Documentation.

DescribeImages

func (c *ECR) DescribeImages(input *DescribeImagesInput) (*DescribeImagesOutput, error)

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

DescribeImagesPages

func (c *ECR) DescribeImagesPages(input *DescribeImagesInput, fn func(*DescribeImagesOutput, bool) bool) error

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 *DescribeImagesOutput, lastPage bool) bool { pageNum++ fmt.Println(page) return pageNum <= 3 })

See Also

For more information about using this API, see AWS API Documentation.

DescribeImagesPagesWithContext

func (c *ECR) DescribeImagesPagesWithContext(ctx aws.Context, input *DescribeImagesInput, fn func(*DescribeImagesOutput, bool) bool, opts ...request.Option) error

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.

See Also

For more information about using this API, see AWS API Documentation.

DescribeImagesRequest

func (c *ECR) DescribeImagesRequest(input *DescribeImagesInput) (req *request.Request, output *DescribeImagesOutput)

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

DescribeImagesWithContext

func (c *ECR) DescribeImagesWithContext(ctx aws.Context, input *DescribeImagesInput, opts ...request.Option) (*DescribeImagesOutput, error)

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.

See Also

For more information about using this API, see AWS API Documentation.

DescribeRepositories

func (c *ECR) DescribeRepositories(input *DescribeRepositoriesInput) (*DescribeRepositoriesOutput, error)

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

Example

ECR DescribeRepositories shared00

To describe all repositories in the current account

The following example obtains a list and description of all repositories in the default registry to which the current user has access.

{ svc := ecr.New(session.New()) input := &ecr.DescribeRepositoriesInput{} result, err := svc.DescribeRepositories(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case ecr.ErrCodeServerException: fmt.Println(ecr.ErrCodeServerException, aerr.Error()) case ecr.ErrCodeInvalidParameterException: fmt.Println(ecr.ErrCodeInvalidParameterException, aerr.Error()) case ecr.ErrCodeRepositoryNotFoundException: fmt.Println(ecr.ErrCodeRepositoryNotFoundException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

DescribeRepositoriesPages

func (c *ECR) DescribeRepositoriesPages(input *DescribeRepositoriesInput, fn func(*DescribeRepositoriesOutput, bool) bool) error

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 *DescribeRepositoriesOutput, lastPage bool) bool { pageNum++ fmt.Println(page) return pageNum <= 3 })

See Also

For more information about using this API, see AWS API Documentation.

DescribeRepositoriesPagesWithContext

func (c *ECR) DescribeRepositoriesPagesWithContext(ctx aws.Context, input *DescribeRepositoriesInput, fn func(*DescribeRepositoriesOutput, bool) bool, opts ...request.Option) error

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.

See Also

For more information about using this API, see AWS API Documentation.

DescribeRepositoriesRequest

func (c *ECR) DescribeRepositoriesRequest(input *DescribeRepositoriesInput) (req *request.Request, output *DescribeRepositoriesOutput)

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

DescribeRepositoriesWithContext

func (c *ECR) DescribeRepositoriesWithContext(ctx aws.Context, input *DescribeRepositoriesInput, opts ...request.Option) (*DescribeRepositoriesOutput, error)

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.

See Also

For more information about using this API, see AWS API Documentation.

GetAuthorizationToken

func (c *ECR) GetAuthorizationToken(input *GetAuthorizationTokenInput) (*GetAuthorizationTokenOutput, error)

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

Example

ECR GetAuthorizationToken shared00

To obtain an authorization token

This example gets an authorization token for your default registry.

{ svc := ecr.New(session.New()) input := &ecr.GetAuthorizationTokenInput{} result, err := svc.GetAuthorizationToken(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case ecr.ErrCodeServerException: fmt.Println(ecr.ErrCodeServerException, aerr.Error()) case ecr.ErrCodeInvalidParameterException: fmt.Println(ecr.ErrCodeInvalidParameterException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

GetAuthorizationTokenRequest

func (c *ECR) GetAuthorizationTokenRequest(input *GetAuthorizationTokenInput) (req *request.Request, output *GetAuthorizationTokenOutput)

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

GetAuthorizationTokenWithContext

func (c *ECR) GetAuthorizationTokenWithContext(ctx aws.Context, input *GetAuthorizationTokenInput, opts ...request.Option) (*GetAuthorizationTokenOutput, error)

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.

See Also

For more information about using this API, see AWS API Documentation.

GetDownloadUrlForLayer

func (c *ECR) GetDownloadUrlForLayer(input *GetDownloadUrlForLayerInput) (*GetDownloadUrlForLayerOutput, error)

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

GetDownloadUrlForLayerRequest

func (c *ECR) GetDownloadUrlForLayerRequest(input *GetDownloadUrlForLayerInput) (req *request.Request, output *GetDownloadUrlForLayerOutput)

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

GetDownloadUrlForLayerWithContext

func (c *ECR) GetDownloadUrlForLayerWithContext(ctx aws.Context, input *GetDownloadUrlForLayerInput, opts ...request.Option) (*GetDownloadUrlForLayerOutput, error)

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.

See Also

For more information about using this API, see AWS API Documentation.

GetLifecyclePolicy

func (c *ECR) GetLifecyclePolicy(input *GetLifecyclePolicyInput) (*GetLifecyclePolicyOutput, error)

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

GetLifecyclePolicyPreview

func (c *ECR) GetLifecyclePolicyPreview(input *GetLifecyclePolicyPreviewInput) (*GetLifecyclePolicyPreviewOutput, error)

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

GetLifecyclePolicyPreviewRequest

func (c *ECR) GetLifecyclePolicyPreviewRequest(input *GetLifecyclePolicyPreviewInput) (req *request.Request, output *GetLifecyclePolicyPreviewOutput)

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

GetLifecyclePolicyPreviewWithContext

func (c *ECR) GetLifecyclePolicyPreviewWithContext(ctx aws.Context, input *GetLifecyclePolicyPreviewInput, opts ...request.Option) (*GetLifecyclePolicyPreviewOutput, error)

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.

See Also

For more information about using this API, see AWS API Documentation.

GetLifecyclePolicyRequest

func (c *ECR) GetLifecyclePolicyRequest(input *GetLifecyclePolicyInput) (req *request.Request, output *GetLifecyclePolicyOutput)

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

GetLifecyclePolicyWithContext

func (c *ECR) GetLifecyclePolicyWithContext(ctx aws.Context, input *GetLifecyclePolicyInput, opts ...request.Option) (*GetLifecyclePolicyOutput, error)

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.

See Also

For more information about using this API, see AWS API Documentation.

GetRepositoryPolicy

func (c *ECR) GetRepositoryPolicy(input *GetRepositoryPolicyInput) (*GetRepositoryPolicyOutput, error)

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

Example

ECR GetRepositoryPolicy shared00

To get the current policy for a repository

This example obtains the repository policy for the repository named ubuntu.

{ svc := ecr.New(session.New()) input := &ecr.GetRepositoryPolicyInput{ RepositoryName: aws.String("ubuntu"), } result, err := svc.GetRepositoryPolicy(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case ecr.ErrCodeServerException: fmt.Println(ecr.ErrCodeServerException, aerr.Error()) case ecr.ErrCodeInvalidParameterException: fmt.Println(ecr.ErrCodeInvalidParameterException, aerr.Error()) case ecr.ErrCodeRepositoryNotFoundException: fmt.Println(ecr.ErrCodeRepositoryNotFoundException, aerr.Error()) case ecr.ErrCodeRepositoryPolicyNotFoundException: fmt.Println(ecr.ErrCodeRepositoryPolicyNotFoundException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

GetRepositoryPolicyRequest

func (c *ECR) GetRepositoryPolicyRequest(input *GetRepositoryPolicyInput) (req *request.Request, output *GetRepositoryPolicyOutput)

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

GetRepositoryPolicyWithContext

func (c *ECR) GetRepositoryPolicyWithContext(ctx aws.Context, input *GetRepositoryPolicyInput, opts ...request.Option) (*GetRepositoryPolicyOutput, error)

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.

See Also

For more information about using this API, see AWS API Documentation.

InitiateLayerUpload

func (c *ECR) InitiateLayerUpload(input *InitiateLayerUploadInput) (*InitiateLayerUploadOutput, error)

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

InitiateLayerUploadRequest

func (c *ECR) InitiateLayerUploadRequest(input *InitiateLayerUploadInput) (req *request.Request, output *InitiateLayerUploadOutput)

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

InitiateLayerUploadWithContext

func (c *ECR) InitiateLayerUploadWithContext(ctx aws.Context, input *InitiateLayerUploadInput, opts ...request.Option) (*InitiateLayerUploadOutput, error)

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.

See Also

For more information about using this API, see AWS API Documentation.

ListImages

func (c *ECR) ListImages(input *ListImagesInput) (*ListImagesOutput, error)

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

Example

ECR ListImages shared00

To list all images in a repository

This example lists all of the images in the repository named ubuntu in the default registry in the current account.

{ svc := ecr.New(session.New()) input := &ecr.ListImagesInput{ RepositoryName: aws.String("ubuntu"), } result, err := svc.ListImages(input) if err != nil { if aerr, ok := err.(awserr.Error); ok { switch aerr.Code() { case ecr.ErrCodeServerException: fmt.Println(ecr.ErrCodeServerException, aerr.Error()) case ecr.ErrCodeInvalidParameterException: fmt.Println(ecr.ErrCodeInvalidParameterException, aerr.Error()) case ecr.ErrCodeRepositoryNotFoundException: fmt.Println(ecr.ErrCodeRepositoryNotFoundException, aerr.Error()) default: fmt.Println(aerr.Error()) } } else { fmt.Println(err.Error()) } return } fmt.Println(result) }

ListImagesPages

func (c *ECR) ListImagesPages(input *ListImagesInput, fn func(*ListImagesOutput, bool) bool) error

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 *ListImagesOutput, lastPage bool) bool { pageNum++ fmt.Println(page) return pageNum <= 3 })

See Also

For more information about using this API, see AWS API Documentation.

ListImagesPagesWithContext

func (c *ECR) ListImagesPagesWithContext(ctx aws.Context, input *ListImagesInput, fn func(*ListImagesOutput, bool) bool, opts ...request.Option) error

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.

See Also

For more information about using this API, see AWS API Documentation.

ListImagesRequest

func (c *ECR) ListImagesRequest(input *ListImagesInput) (req *request.Request, output *ListImagesOutput)

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

ListImagesWithContext

func (c *ECR) ListImagesWithContext(ctx aws.Context, input *ListImagesInput, opts ...request.Option) (*ListImagesOutput, error)

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.

See Also

For more information about using this API, see AWS API Documentation.

ListTagsForResource

func (c *ECR) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error)

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

ListTagsForResourceRequest

func (c *ECR) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput)

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

ListTagsForResourceWithContext

func (c *ECR) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error)

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.

See Also

For more information about using this API, see AWS API Documentation.

PutImage

func (c *ECR) PutImage(input *PutImageInput) (*PutImageOutput, error)

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

(http://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/PutImage

PutImageRequest

func (c *ECR) PutImageRequest(input *PutImageInput) (req *request.Request, output *PutImageOutput)

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

PutImageWithContext

func (c *ECR) PutImageWithContext(ctx aws.Context, input *PutImageInput, opts ...request.Option) (*PutImageOutput, error)

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.

See Also

For more information about using this API, see AWS API Documentation.

PutLifecyclePolicy

func (c *ECR) PutLifecyclePolicy(input *PutLifecyclePolicyInput) (*PutLifecyclePolicyOutput, error)

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

PutLifecyclePolicyRequest

func (c *ECR) PutLifecyclePolicyRequest(input *PutLifecyclePolicyInput) (req *request.Request, output *PutLifecyclePolicyOutput)

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

PutLifecyclePolicyWithContext

func (c *ECR) PutLifecyclePolicyWithContext(ctx aws.Context, input *PutLifecyclePolicyInput, opts ...request.Option) (*PutLifecyclePolicyOutput, error)

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.

See Also

For more information about using this API, see AWS API Documentation.

SetRepositoryPolicy

func (c *ECR) SetRepositoryPolicy(input *SetRepositoryPolicyInput) (*SetRepositoryPolicyOutput, error)

SetRepositoryPolicy API operation for Amazon EC2 Container Registry.

Applies a repository policy on a specified repository to control access permissions.

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

SetRepositoryPolicyRequest

func (c *ECR) SetRepositoryPolicyRequest(input *SetRepositoryPolicyInput) (req *request.Request, output *SetRepositoryPolicyOutput)

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

SetRepositoryPolicyWithContext

func (c *ECR) SetRepositoryPolicyWithContext(ctx aws.Context, input *SetRepositoryPolicyInput, opts ...request.Option) (*SetRepositoryPolicyOutput, error)

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.

See Also

For more information about using this API, see AWS API Documentation.

StartLifecyclePolicyPreview

func (c *ECR) StartLifecyclePolicyPreview(input *StartLifecyclePolicyPreviewInput) (*StartLifecyclePolicyPreviewOutput, error)

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

StartLifecyclePolicyPreviewRequest

func (c *ECR) StartLifecyclePolicyPreviewRequest(input *StartLifecyclePolicyPreviewInput) (req *request.Request, output *StartLifecyclePolicyPreviewOutput)

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

StartLifecyclePolicyPreviewWithContext

func (c *ECR) StartLifecyclePolicyPreviewWithContext(ctx aws.Context, input *StartLifecyclePolicyPreviewInput, opts ...request.Option) (*StartLifecyclePolicyPreviewOutput, error)

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.

See Also

For more information about using this API, see AWS API Documentation.

TagResource

func (c *ECR) TagResource(input *TagResourceInput) (*TagResourceOutput, error)

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

TagResourceRequest

func (c *ECR) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput)

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

TagResourceWithContext

func (c *ECR) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error)

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.

See Also

For more information about using this API, see AWS API Documentation.

UntagResource

func (c *ECR) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error)

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

UntagResourceRequest

func (c *ECR) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput)

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

UntagResourceWithContext

func (c *ECR) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error)

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.

See Also

For more information about using this API, see AWS API Documentation.

UploadLayerPart

func (c *ECR) UploadLayerPart(input *UploadLayerPartInput) (*UploadLayerPartOutput, error)

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

(http://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

UploadLayerPartRequest

func (c *ECR) UploadLayerPartRequest(input *UploadLayerPartInput) (req *request.Request, output *UploadLayerPartOutput)

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

UploadLayerPartWithContext

func (c *ECR) UploadLayerPartWithContext(ctx aws.Context, input *UploadLayerPartInput, opts ...request.Option) (*UploadLayerPartOutput, error)

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.

See Also

For more information about using this API, see AWS API Documentation.

On this page: