/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the ecr-public-2020-10-30.normal.json service model. */ using System; using System.Runtime.ExceptionServices; using System.Threading; using System.Threading.Tasks; using System.Collections.Generic; using System.Net; using Amazon.ECRPublic.Model; using Amazon.ECRPublic.Model.Internal.MarshallTransformations; using Amazon.ECRPublic.Internal; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Auth; using Amazon.Runtime.Internal.Transform; namespace Amazon.ECRPublic { /// /// Implementation for accessing ECRPublic /// /// Amazon Elastic Container Registry Public /// /// Amazon Elastic Container Registry Public (Amazon ECR Public) is a managed container /// image registry service. Amazon ECR provides both public and private registries to /// host your container images. You can use the Docker CLI or your preferred client to /// push, pull, and manage images. Amazon ECR provides a secure, scalable, and reliable /// registry for your Docker or Open Container Initiative (OCI) images. Amazon ECR supports /// public repositories with this API. For information about the Amazon ECR API for private /// repositories, see Amazon /// Elastic Container Registry API Reference. /// /// public partial class AmazonECRPublicClient : AmazonServiceClient, IAmazonECRPublic { private static IServiceMetadata serviceMetadata = new AmazonECRPublicMetadata(); #region Constructors /// /// Constructs AmazonECRPublicClient with the credentials loaded from the application's /// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. /// /// Example App.config with credentials set. /// /// <?xml version="1.0" encoding="utf-8" ?> /// <configuration> /// <appSettings> /// <add key="AWSProfileName" value="AWS Default"/> /// </appSettings> /// </configuration> /// /// /// public AmazonECRPublicClient() : base(FallbackCredentialsFactory.GetCredentials(), new AmazonECRPublicConfig()) { } /// /// Constructs AmazonECRPublicClient with the credentials loaded from the application's /// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. /// /// Example App.config with credentials set. /// /// <?xml version="1.0" encoding="utf-8" ?> /// <configuration> /// <appSettings> /// <add key="AWSProfileName" value="AWS Default"/> /// </appSettings> /// </configuration> /// /// /// /// The region to connect. public AmazonECRPublicClient(RegionEndpoint region) : base(FallbackCredentialsFactory.GetCredentials(), new AmazonECRPublicConfig{RegionEndpoint = region}) { } /// /// Constructs AmazonECRPublicClient with the credentials loaded from the application's /// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. /// /// Example App.config with credentials set. /// /// <?xml version="1.0" encoding="utf-8" ?> /// <configuration> /// <appSettings> /// <add key="AWSProfileName" value="AWS Default"/> /// </appSettings> /// </configuration> /// /// /// /// The AmazonECRPublicClient Configuration Object public AmazonECRPublicClient(AmazonECRPublicConfig config) : base(FallbackCredentialsFactory.GetCredentials(config), config){} /// /// Constructs AmazonECRPublicClient with AWS Credentials /// /// AWS Credentials public AmazonECRPublicClient(AWSCredentials credentials) : this(credentials, new AmazonECRPublicConfig()) { } /// /// Constructs AmazonECRPublicClient with AWS Credentials /// /// AWS Credentials /// The region to connect. public AmazonECRPublicClient(AWSCredentials credentials, RegionEndpoint region) : this(credentials, new AmazonECRPublicConfig{RegionEndpoint = region}) { } /// /// Constructs AmazonECRPublicClient with AWS Credentials and an /// AmazonECRPublicClient Configuration object. /// /// AWS Credentials /// The AmazonECRPublicClient Configuration Object public AmazonECRPublicClient(AWSCredentials credentials, AmazonECRPublicConfig clientConfig) : base(credentials, clientConfig) { } /// /// Constructs AmazonECRPublicClient with AWS Access Key ID and AWS Secret Key /// /// AWS Access Key ID /// AWS Secret Access Key public AmazonECRPublicClient(string awsAccessKeyId, string awsSecretAccessKey) : this(awsAccessKeyId, awsSecretAccessKey, new AmazonECRPublicConfig()) { } /// /// Constructs AmazonECRPublicClient with AWS Access Key ID and AWS Secret Key /// /// AWS Access Key ID /// AWS Secret Access Key /// The region to connect. public AmazonECRPublicClient(string awsAccessKeyId, string awsSecretAccessKey, RegionEndpoint region) : this(awsAccessKeyId, awsSecretAccessKey, new AmazonECRPublicConfig() {RegionEndpoint=region}) { } /// /// Constructs AmazonECRPublicClient with AWS Access Key ID, AWS Secret Key and an /// AmazonECRPublicClient Configuration object. /// /// AWS Access Key ID /// AWS Secret Access Key /// The AmazonECRPublicClient Configuration Object public AmazonECRPublicClient(string awsAccessKeyId, string awsSecretAccessKey, AmazonECRPublicConfig clientConfig) : base(awsAccessKeyId, awsSecretAccessKey, clientConfig) { } /// /// Constructs AmazonECRPublicClient with AWS Access Key ID and AWS Secret Key /// /// AWS Access Key ID /// AWS Secret Access Key /// AWS Session Token public AmazonECRPublicClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken) : this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonECRPublicConfig()) { } /// /// Constructs AmazonECRPublicClient with AWS Access Key ID and AWS Secret Key /// /// AWS Access Key ID /// AWS Secret Access Key /// AWS Session Token /// The region to connect. public AmazonECRPublicClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, RegionEndpoint region) : this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonECRPublicConfig{RegionEndpoint = region}) { } /// /// Constructs AmazonECRPublicClient with AWS Access Key ID, AWS Secret Key and an /// AmazonECRPublicClient Configuration object. /// /// AWS Access Key ID /// AWS Secret Access Key /// AWS Session Token /// The AmazonECRPublicClient Configuration Object public AmazonECRPublicClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, AmazonECRPublicConfig clientConfig) : base(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, clientConfig) { } #endregion #if AWS_ASYNC_ENUMERABLES_API private IECRPublicPaginatorFactory _paginators; /// /// Paginators for the service /// public IECRPublicPaginatorFactory Paginators { get { if (this._paginators == null) { this._paginators = new ECRPublicPaginatorFactory(this); } return this._paginators; } } #endif #region Overrides /// /// Creates the signer for the service. /// protected override AbstractAWSSigner CreateSigner() { return new AWS4Signer(); } /// /// Customizes the runtime pipeline. /// /// Runtime pipeline for the current client. protected override void CustomizeRuntimePipeline(RuntimePipeline pipeline) { pipeline.RemoveHandler(); pipeline.AddHandlerAfter(new AmazonECRPublicEndpointResolver()); } /// /// Capture metadata for the service. /// protected override IServiceMetadata ServiceMetadata { get { return serviceMetadata; } } #endregion #region Dispose /// /// Disposes the service client. /// protected override void Dispose(bool disposing) { base.Dispose(disposing); } #endregion #region BatchCheckLayerAvailability internal virtual BatchCheckLayerAvailabilityResponse BatchCheckLayerAvailability(BatchCheckLayerAvailabilityRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = BatchCheckLayerAvailabilityRequestMarshaller.Instance; options.ResponseUnmarshaller = BatchCheckLayerAvailabilityResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Checks the availability of one or more image layers that are within a repository in /// a public registry. When an image is pushed to a repository, each image layer is checked /// to verify if it has been uploaded before. If it has been uploaded, then the image /// layer is skipped. /// /// /// /// This operation is used by the Amazon ECR proxy and is not generally used by customers /// for pulling and pushing images. In most cases, you should use the docker /// CLI to pull, tag, and push images. /// /// /// /// Container for the necessary parameters to execute the BatchCheckLayerAvailability service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the BatchCheckLayerAvailability service method, as returned by ECRPublic. /// /// The specified parameter is invalid. Review the available parameters for the API request. /// /// /// The registry doesn't exist. /// /// /// The specified repository can't be found. Check the spelling of the specified repository /// and ensure that you're performing operations on the correct registry. /// /// /// These errors are usually caused by a server-side issue. /// /// /// The action isn't supported in this Region. /// /// REST API Reference for BatchCheckLayerAvailability Operation public virtual Task BatchCheckLayerAvailabilityAsync(BatchCheckLayerAvailabilityRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = BatchCheckLayerAvailabilityRequestMarshaller.Instance; options.ResponseUnmarshaller = BatchCheckLayerAvailabilityResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region BatchDeleteImage internal virtual BatchDeleteImageResponse BatchDeleteImage(BatchDeleteImageRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = BatchDeleteImageRequestMarshaller.Instance; options.ResponseUnmarshaller = BatchDeleteImageResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Deletes a list of specified images that are within a repository in a public registry. /// Images are specified with either an 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 digest /// of the image in your request. /// /// /// Container for the necessary parameters to execute the BatchDeleteImage service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the BatchDeleteImage service method, as returned by ECRPublic. /// /// The specified parameter is invalid. Review the available parameters for the API request. /// /// /// The specified repository can't be found. Check the spelling of the specified repository /// and ensure that you're performing operations on the correct registry. /// /// /// These errors are usually caused by a server-side issue. /// /// /// The action isn't supported in this Region. /// /// REST API Reference for BatchDeleteImage Operation public virtual Task BatchDeleteImageAsync(BatchDeleteImageRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = BatchDeleteImageRequestMarshaller.Instance; options.ResponseUnmarshaller = BatchDeleteImageResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region CompleteLayerUpload internal virtual CompleteLayerUploadResponse CompleteLayerUpload(CompleteLayerUploadRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = CompleteLayerUploadRequestMarshaller.Instance; options.ResponseUnmarshaller = CompleteLayerUploadResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Informs Amazon ECR that the image layer upload is complete for a specified public /// registry, repository name, and upload ID. You can optionally provide a sha256 /// digest of the image layer for data validation purposes. /// /// /// /// When an image is pushed, the CompleteLayerUpload API is called once for each new image /// layer to verify that the upload is complete. /// /// /// /// This operation is used by the Amazon ECR proxy and is not generally used by customers /// for pulling and pushing images. In most cases, you should use the docker /// CLI to pull, tag, and push images. /// /// /// /// Container for the necessary parameters to execute the CompleteLayerUpload service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the CompleteLayerUpload service method, as returned by ECRPublic. /// /// The specified layer upload doesn't contain any layer parts. /// /// /// The layer digest calculation performed by Amazon ECR when the image layer doesn't /// match the digest specified. /// /// /// The specified parameter is invalid. Review the available parameters for the API request. /// /// /// The image layer already exists in the associated repository. /// /// /// Layer parts must be at least 5 MiB in size. /// /// /// The registry doesn't exist. /// /// /// The specified repository can't be found. Check the spelling of the specified repository /// and ensure that you're performing operations on the correct registry. /// /// /// These errors are usually caused by a server-side issue. /// /// /// The action isn't supported in this Region. /// /// /// The upload can't be found, or the specified upload ID isn't valid for this repository. /// /// REST API Reference for CompleteLayerUpload Operation public virtual Task CompleteLayerUploadAsync(CompleteLayerUploadRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = CompleteLayerUploadRequestMarshaller.Instance; options.ResponseUnmarshaller = CompleteLayerUploadResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region CreateRepository internal virtual CreateRepositoryResponse CreateRepository(CreateRepositoryRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = CreateRepositoryRequestMarshaller.Instance; options.ResponseUnmarshaller = CreateRepositoryResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Creates a repository in a public registry. For more information, see Amazon /// ECR repositories in the Amazon Elastic Container Registry User Guide. /// /// Container for the necessary parameters to execute the CreateRepository service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the CreateRepository service method, as returned by ECRPublic. /// /// The specified parameter is invalid. Review the available parameters for the API request. /// /// /// 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. /// /// /// The operation didn't succeed because it would have exceeded a service limit for your /// account. For more information, see Amazon /// ECR Service Quotas in the Amazon Elastic Container Registry User Guide. /// /// /// The specified repository already exists in the specified registry. /// /// /// These errors are usually caused by a server-side issue. /// /// /// 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. /// /// /// The action isn't supported in this Region. /// /// REST API Reference for CreateRepository Operation public virtual Task CreateRepositoryAsync(CreateRepositoryRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = CreateRepositoryRequestMarshaller.Instance; options.ResponseUnmarshaller = CreateRepositoryResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region DeleteRepository internal virtual DeleteRepositoryResponse DeleteRepository(DeleteRepositoryRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = DeleteRepositoryRequestMarshaller.Instance; options.ResponseUnmarshaller = DeleteRepositoryResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Deletes a repository in a public registry. If the repository contains images, you /// must either manually delete all images in the repository or use the force /// option. This option deletes all images on your behalf before deleting the repository. /// /// Container for the necessary parameters to execute the DeleteRepository service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the DeleteRepository service method, as returned by ECRPublic. /// /// The specified parameter is invalid. Review the available parameters for the API request. /// /// /// The specified repository contains images. To delete a repository that contains images, /// you must force the deletion with the force parameter. /// /// /// The specified repository can't be found. Check the spelling of the specified repository /// and ensure that you're performing operations on the correct registry. /// /// /// These errors are usually caused by a server-side issue. /// /// /// The action isn't supported in this Region. /// /// REST API Reference for DeleteRepository Operation public virtual Task DeleteRepositoryAsync(DeleteRepositoryRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = DeleteRepositoryRequestMarshaller.Instance; options.ResponseUnmarshaller = DeleteRepositoryResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region DeleteRepositoryPolicy internal virtual DeleteRepositoryPolicyResponse DeleteRepositoryPolicy(DeleteRepositoryPolicyRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = DeleteRepositoryPolicyRequestMarshaller.Instance; options.ResponseUnmarshaller = DeleteRepositoryPolicyResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Deletes the repository policy that's associated with the specified repository. /// /// Container for the necessary parameters to execute the DeleteRepositoryPolicy service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the DeleteRepositoryPolicy service method, as returned by ECRPublic. /// /// The specified parameter is invalid. Review the available parameters for the API request. /// /// /// The specified repository can't be found. Check the spelling of the specified repository /// and ensure that you're performing operations on the correct registry. /// /// /// The specified repository and registry combination doesn't have an associated repository /// policy. /// /// /// These errors are usually caused by a server-side issue. /// /// /// The action isn't supported in this Region. /// /// REST API Reference for DeleteRepositoryPolicy Operation public virtual Task DeleteRepositoryPolicyAsync(DeleteRepositoryPolicyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = DeleteRepositoryPolicyRequestMarshaller.Instance; options.ResponseUnmarshaller = DeleteRepositoryPolicyResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region DescribeImages internal virtual DescribeImagesResponse DescribeImages(DescribeImagesRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = DescribeImagesRequestMarshaller.Instance; options.ResponseUnmarshaller = DescribeImagesResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Returns metadata that's related to the images in a repository in a public registry. /// /// /// /// 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. Therefore, it might return a larger image /// size than the image sizes that are returned by DescribeImages. /// /// /// /// Container for the necessary parameters to execute the DescribeImages service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the DescribeImages service method, as returned by ECRPublic. /// /// The image requested doesn't exist in the specified repository. /// /// /// The specified parameter is invalid. Review the available parameters for the API request. /// /// /// The specified repository can't be found. Check the spelling of the specified repository /// and ensure that you're performing operations on the correct registry. /// /// /// These errors are usually caused by a server-side issue. /// /// /// The action isn't supported in this Region. /// /// REST API Reference for DescribeImages Operation public virtual Task DescribeImagesAsync(DescribeImagesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = DescribeImagesRequestMarshaller.Instance; options.ResponseUnmarshaller = DescribeImagesResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region DescribeImageTags internal virtual DescribeImageTagsResponse DescribeImageTags(DescribeImageTagsRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = DescribeImageTagsRequestMarshaller.Instance; options.ResponseUnmarshaller = DescribeImageTagsResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Returns the image tag details for a repository in a public registry. /// /// Container for the necessary parameters to execute the DescribeImageTags service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the DescribeImageTags service method, as returned by ECRPublic. /// /// The specified parameter is invalid. Review the available parameters for the API request. /// /// /// The specified repository can't be found. Check the spelling of the specified repository /// and ensure that you're performing operations on the correct registry. /// /// /// These errors are usually caused by a server-side issue. /// /// /// The action isn't supported in this Region. /// /// REST API Reference for DescribeImageTags Operation public virtual Task DescribeImageTagsAsync(DescribeImageTagsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = DescribeImageTagsRequestMarshaller.Instance; options.ResponseUnmarshaller = DescribeImageTagsResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region DescribeRegistries internal virtual DescribeRegistriesResponse DescribeRegistries(DescribeRegistriesRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = DescribeRegistriesRequestMarshaller.Instance; options.ResponseUnmarshaller = DescribeRegistriesResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Returns details for a public registry. /// /// Container for the necessary parameters to execute the DescribeRegistries service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the DescribeRegistries service method, as returned by ECRPublic. /// /// The specified parameter is invalid. Review the available parameters for the API request. /// /// /// These errors are usually caused by a server-side issue. /// /// /// The action isn't supported in this Region. /// /// REST API Reference for DescribeRegistries Operation public virtual Task DescribeRegistriesAsync(DescribeRegistriesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = DescribeRegistriesRequestMarshaller.Instance; options.ResponseUnmarshaller = DescribeRegistriesResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region DescribeRepositories internal virtual DescribeRepositoriesResponse DescribeRepositories(DescribeRepositoriesRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = DescribeRepositoriesRequestMarshaller.Instance; options.ResponseUnmarshaller = DescribeRepositoriesResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Describes repositories that are in a public registry. /// /// Container for the necessary parameters to execute the DescribeRepositories service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the DescribeRepositories service method, as returned by ECRPublic. /// /// The specified parameter is invalid. Review the available parameters for the API request. /// /// /// The specified repository can't be found. Check the spelling of the specified repository /// and ensure that you're performing operations on the correct registry. /// /// /// These errors are usually caused by a server-side issue. /// /// /// The action isn't supported in this Region. /// /// REST API Reference for DescribeRepositories Operation public virtual Task DescribeRepositoriesAsync(DescribeRepositoriesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = DescribeRepositoriesRequestMarshaller.Instance; options.ResponseUnmarshaller = DescribeRepositoriesResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region GetAuthorizationToken internal virtual GetAuthorizationTokenResponse GetAuthorizationToken(GetAuthorizationTokenRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = GetAuthorizationTokenRequestMarshaller.Instance; options.ResponseUnmarshaller = GetAuthorizationTokenResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Retrieves an authorization token. An authorization token represents your IAM authentication /// credentials. You can use it to access any Amazon ECR registry that your IAM principal /// has access to. The authorization token is valid for 12 hours. This API requires the /// ecr-public:GetAuthorizationToken and sts:GetServiceBearerToken /// permissions. /// /// Container for the necessary parameters to execute the GetAuthorizationToken service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the GetAuthorizationToken service method, as returned by ECRPublic. /// /// The specified parameter is invalid. Review the available parameters for the API request. /// /// /// These errors are usually caused by a server-side issue. /// /// /// The action isn't supported in this Region. /// /// REST API Reference for GetAuthorizationToken Operation public virtual Task GetAuthorizationTokenAsync(GetAuthorizationTokenRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = GetAuthorizationTokenRequestMarshaller.Instance; options.ResponseUnmarshaller = GetAuthorizationTokenResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region GetRegistryCatalogData internal virtual GetRegistryCatalogDataResponse GetRegistryCatalogData(GetRegistryCatalogDataRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = GetRegistryCatalogDataRequestMarshaller.Instance; options.ResponseUnmarshaller = GetRegistryCatalogDataResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Retrieves catalog metadata for a public registry. /// /// Container for the necessary parameters to execute the GetRegistryCatalogData service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the GetRegistryCatalogData service method, as returned by ECRPublic. /// /// These errors are usually caused by a server-side issue. /// /// /// The action isn't supported in this Region. /// /// REST API Reference for GetRegistryCatalogData Operation public virtual Task GetRegistryCatalogDataAsync(GetRegistryCatalogDataRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = GetRegistryCatalogDataRequestMarshaller.Instance; options.ResponseUnmarshaller = GetRegistryCatalogDataResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region GetRepositoryCatalogData internal virtual GetRepositoryCatalogDataResponse GetRepositoryCatalogData(GetRepositoryCatalogDataRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = GetRepositoryCatalogDataRequestMarshaller.Instance; options.ResponseUnmarshaller = GetRepositoryCatalogDataResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Retrieve catalog metadata for a repository in a public registry. This metadata is /// displayed publicly in the Amazon ECR Public Gallery. /// /// Container for the necessary parameters to execute the GetRepositoryCatalogData service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the GetRepositoryCatalogData service method, as returned by ECRPublic. /// /// The specified parameter is invalid. Review the available parameters for the API request. /// /// /// The repository catalog data doesn't exist. /// /// /// The specified repository can't be found. Check the spelling of the specified repository /// and ensure that you're performing operations on the correct registry. /// /// /// These errors are usually caused by a server-side issue. /// /// /// The action isn't supported in this Region. /// /// REST API Reference for GetRepositoryCatalogData Operation public virtual Task GetRepositoryCatalogDataAsync(GetRepositoryCatalogDataRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = GetRepositoryCatalogDataRequestMarshaller.Instance; options.ResponseUnmarshaller = GetRepositoryCatalogDataResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region GetRepositoryPolicy internal virtual GetRepositoryPolicyResponse GetRepositoryPolicy(GetRepositoryPolicyRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = GetRepositoryPolicyRequestMarshaller.Instance; options.ResponseUnmarshaller = GetRepositoryPolicyResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Retrieves the repository policy for the specified repository. /// /// Container for the necessary parameters to execute the GetRepositoryPolicy service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the GetRepositoryPolicy service method, as returned by ECRPublic. /// /// The specified parameter is invalid. Review the available parameters for the API request. /// /// /// The specified repository can't be found. Check the spelling of the specified repository /// and ensure that you're performing operations on the correct registry. /// /// /// The specified repository and registry combination doesn't have an associated repository /// policy. /// /// /// These errors are usually caused by a server-side issue. /// /// /// The action isn't supported in this Region. /// /// REST API Reference for GetRepositoryPolicy Operation public virtual Task GetRepositoryPolicyAsync(GetRepositoryPolicyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = GetRepositoryPolicyRequestMarshaller.Instance; options.ResponseUnmarshaller = GetRepositoryPolicyResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region InitiateLayerUpload internal virtual InitiateLayerUploadResponse InitiateLayerUpload(InitiateLayerUploadRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = InitiateLayerUploadRequestMarshaller.Instance; options.ResponseUnmarshaller = InitiateLayerUploadResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Notifies Amazon ECR that you intend to upload an image layer. /// /// /// /// When an image is pushed, the InitiateLayerUpload API is called once for each image /// layer that hasn't already been uploaded. Whether an image layer uploads is determined /// by the BatchCheckLayerAvailability API action. /// /// /// /// This operation is used by the Amazon ECR proxy and is not generally used by customers /// for pulling and pushing images. In most cases, you should use the docker /// CLI to pull, tag, and push images. /// /// /// /// Container for the necessary parameters to execute the InitiateLayerUpload service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the InitiateLayerUpload service method, as returned by ECRPublic. /// /// The specified parameter is invalid. Review the available parameters for the API request. /// /// /// The registry doesn't exist. /// /// /// The specified repository can't be found. Check the spelling of the specified repository /// and ensure that you're performing operations on the correct registry. /// /// /// These errors are usually caused by a server-side issue. /// /// /// The action isn't supported in this Region. /// /// REST API Reference for InitiateLayerUpload Operation public virtual Task InitiateLayerUploadAsync(InitiateLayerUploadRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = InitiateLayerUploadRequestMarshaller.Instance; options.ResponseUnmarshaller = InitiateLayerUploadResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region ListTagsForResource internal virtual ListTagsForResourceResponse ListTagsForResource(ListTagsForResourceRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = ListTagsForResourceRequestMarshaller.Instance; options.ResponseUnmarshaller = ListTagsForResourceResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// List the tags for an Amazon ECR Public resource. /// /// Container for the necessary parameters to execute the ListTagsForResource service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the ListTagsForResource service method, as returned by ECRPublic. /// /// The specified parameter is invalid. Review the available parameters for the API request. /// /// /// The specified repository can't be found. Check the spelling of the specified repository /// and ensure that you're performing operations on the correct registry. /// /// /// These errors are usually caused by a server-side issue. /// /// /// The action isn't supported in this Region. /// /// REST API Reference for ListTagsForResource Operation public virtual Task ListTagsForResourceAsync(ListTagsForResourceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = ListTagsForResourceRequestMarshaller.Instance; options.ResponseUnmarshaller = ListTagsForResourceResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region PutImage internal virtual PutImageResponse PutImage(PutImageRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = PutImageRequestMarshaller.Instance; options.ResponseUnmarshaller = PutImageResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Creates or updates the image manifest and tags that are associated with an image. /// /// /// /// When an image is pushed and all new image layers have been uploaded, the PutImage /// API is called once to create or update the image manifest and the tags that are associated /// with the image. /// /// /// /// This operation is used by the Amazon ECR proxy and is not generally used by customers /// for pulling and pushing images. In most cases, you should use the docker /// CLI to pull, tag, and push images. /// /// /// /// Container for the necessary parameters to execute the PutImage service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the PutImage service method, as returned by ECRPublic. /// /// The specified image has already been pushed, and there were no changes to the manifest /// or image tag after the last push. /// /// /// The specified image digest doesn't match the digest that Amazon ECR calculated for /// the image. /// /// /// The specified image is tagged with a tag that already exists. The repository is configured /// for tag immutability. /// /// /// The specified parameter is invalid. Review the available parameters for the API request. /// /// /// The specified layers can't be found, or the specified layer isn't valid for this repository. /// /// /// The operation didn't succeed because it would have exceeded a service limit for your /// account. For more information, see Amazon /// ECR Service Quotas in the Amazon Elastic Container Registry User Guide. /// /// /// The manifest list is referencing an image that doesn't exist. /// /// /// The registry doesn't exist. /// /// /// The specified repository can't be found. Check the spelling of the specified repository /// and ensure that you're performing operations on the correct registry. /// /// /// These errors are usually caused by a server-side issue. /// /// /// The action isn't supported in this Region. /// /// REST API Reference for PutImage Operation public virtual Task PutImageAsync(PutImageRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = PutImageRequestMarshaller.Instance; options.ResponseUnmarshaller = PutImageResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region PutRegistryCatalogData internal virtual PutRegistryCatalogDataResponse PutRegistryCatalogData(PutRegistryCatalogDataRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = PutRegistryCatalogDataRequestMarshaller.Instance; options.ResponseUnmarshaller = PutRegistryCatalogDataResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Create or update the catalog data for a public registry. /// /// Container for the necessary parameters to execute the PutRegistryCatalogData service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the PutRegistryCatalogData service method, as returned by ECRPublic. /// /// The specified parameter is invalid. Review the available parameters for the API request. /// /// /// These errors are usually caused by a server-side issue. /// /// /// The action isn't supported in this Region. /// /// REST API Reference for PutRegistryCatalogData Operation public virtual Task PutRegistryCatalogDataAsync(PutRegistryCatalogDataRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = PutRegistryCatalogDataRequestMarshaller.Instance; options.ResponseUnmarshaller = PutRegistryCatalogDataResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region PutRepositoryCatalogData internal virtual PutRepositoryCatalogDataResponse PutRepositoryCatalogData(PutRepositoryCatalogDataRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = PutRepositoryCatalogDataRequestMarshaller.Instance; options.ResponseUnmarshaller = PutRepositoryCatalogDataResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Creates or updates the catalog data for a repository in a public registry. /// /// Container for the necessary parameters to execute the PutRepositoryCatalogData service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the PutRepositoryCatalogData service method, as returned by ECRPublic. /// /// The specified parameter is invalid. Review the available parameters for the API request. /// /// /// The specified repository can't be found. Check the spelling of the specified repository /// and ensure that you're performing operations on the correct registry. /// /// /// These errors are usually caused by a server-side issue. /// /// /// The action isn't supported in this Region. /// /// REST API Reference for PutRepositoryCatalogData Operation public virtual Task PutRepositoryCatalogDataAsync(PutRepositoryCatalogDataRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = PutRepositoryCatalogDataRequestMarshaller.Instance; options.ResponseUnmarshaller = PutRepositoryCatalogDataResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region SetRepositoryPolicy internal virtual SetRepositoryPolicyResponse SetRepositoryPolicy(SetRepositoryPolicyRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = SetRepositoryPolicyRequestMarshaller.Instance; options.ResponseUnmarshaller = SetRepositoryPolicyResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Applies a repository policy to the specified public repository to control access permissions. /// For more information, see Amazon /// ECR Repository Policies in the Amazon Elastic Container Registry User Guide. /// /// Container for the necessary parameters to execute the SetRepositoryPolicy service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the SetRepositoryPolicy service method, as returned by ECRPublic. /// /// The specified parameter is invalid. Review the available parameters for the API request. /// /// /// The specified repository can't be found. Check the spelling of the specified repository /// and ensure that you're performing operations on the correct registry. /// /// /// These errors are usually caused by a server-side issue. /// /// /// The action isn't supported in this Region. /// /// REST API Reference for SetRepositoryPolicy Operation public virtual Task SetRepositoryPolicyAsync(SetRepositoryPolicyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = SetRepositoryPolicyRequestMarshaller.Instance; options.ResponseUnmarshaller = SetRepositoryPolicyResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region TagResource internal virtual TagResourceResponse TagResource(TagResourceRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = TagResourceRequestMarshaller.Instance; options.ResponseUnmarshaller = TagResourceResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Associates the specified tags to a resource with the specified resourceArn. /// If existing tags on a resource aren't specified in the request parameters, they aren't /// changed. When a resource is deleted, the tags associated with that resource are also /// deleted. /// /// Container for the necessary parameters to execute the TagResource service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the TagResource service method, as returned by ECRPublic. /// /// The specified parameter is invalid. Review the available parameters for the API request. /// /// /// 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. /// /// /// The specified repository can't be found. Check the spelling of the specified repository /// and ensure that you're performing operations on the correct registry. /// /// /// These errors are usually caused by a server-side issue. /// /// /// 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. /// /// /// The action isn't supported in this Region. /// /// REST API Reference for TagResource Operation public virtual Task TagResourceAsync(TagResourceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = TagResourceRequestMarshaller.Instance; options.ResponseUnmarshaller = TagResourceResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region UntagResource internal virtual UntagResourceResponse UntagResource(UntagResourceRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = UntagResourceRequestMarshaller.Instance; options.ResponseUnmarshaller = UntagResourceResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Deletes specified tags from a resource. /// /// Container for the necessary parameters to execute the UntagResource service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the UntagResource service method, as returned by ECRPublic. /// /// The specified parameter is invalid. Review the available parameters for the API request. /// /// /// 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. /// /// /// The specified repository can't be found. Check the spelling of the specified repository /// and ensure that you're performing operations on the correct registry. /// /// /// These errors are usually caused by a server-side issue. /// /// /// 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. /// /// /// The action isn't supported in this Region. /// /// REST API Reference for UntagResource Operation public virtual Task UntagResourceAsync(UntagResourceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = UntagResourceRequestMarshaller.Instance; options.ResponseUnmarshaller = UntagResourceResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion #region UploadLayerPart internal virtual UploadLayerPartResponse UploadLayerPart(UploadLayerPartRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = UploadLayerPartRequestMarshaller.Instance; options.ResponseUnmarshaller = UploadLayerPartResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Uploads an image layer part to Amazon ECR. /// /// /// /// When an image is pushed, each new image layer is uploaded in parts. The maximum size /// of each image layer part can be 20971520 bytes (about 20MB). The UploadLayerPart API /// is called once for each new image layer part. /// /// /// /// This operation is used by the Amazon ECR proxy and is not generally used by customers /// for pulling and pushing images. In most cases, you should use the docker /// CLI to pull, tag, and push images. /// /// /// /// Container for the necessary parameters to execute the UploadLayerPart service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the UploadLayerPart service method, as returned by ECRPublic. /// /// The layer part size isn't valid, or the first byte specified isn't consecutive to /// the last byte of a previous layer part upload. /// /// /// The specified parameter is invalid. Review the available parameters for the API request. /// /// /// The operation didn't succeed because it would have exceeded a service limit for your /// account. For more information, see Amazon /// ECR Service Quotas in the Amazon Elastic Container Registry User Guide. /// /// /// The registry doesn't exist. /// /// /// The specified repository can't be found. Check the spelling of the specified repository /// and ensure that you're performing operations on the correct registry. /// /// /// These errors are usually caused by a server-side issue. /// /// /// The action isn't supported in this Region. /// /// /// The upload can't be found, or the specified upload ID isn't valid for this repository. /// /// REST API Reference for UploadLayerPart Operation public virtual Task UploadLayerPartAsync(UploadLayerPartRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = UploadLayerPartRequestMarshaller.Instance; options.ResponseUnmarshaller = UploadLayerPartResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion } }