
commonMain.aws.sdk.kotlin.services.ecr.DefaultEcrClient.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.ecr
import aws.sdk.kotlin.runtime.client.AwsClientOption
import aws.sdk.kotlin.runtime.http.ApiMetadata
import aws.sdk.kotlin.runtime.http.AwsUserAgentMetadata
import aws.sdk.kotlin.runtime.http.middleware.AwsRetryHeaderMiddleware
import aws.sdk.kotlin.runtime.http.middleware.RecursionDetection
import aws.sdk.kotlin.runtime.http.middleware.UserAgent
import aws.sdk.kotlin.services.ecr.endpoints.internal.ResolveEndpoint
import aws.sdk.kotlin.services.ecr.endpoints.internal.bindAwsBuiltins
import aws.sdk.kotlin.services.ecr.model.*
import aws.sdk.kotlin.services.ecr.model.BatchCheckLayerAvailabilityRequest
import aws.sdk.kotlin.services.ecr.model.BatchDeleteImageRequest
import aws.sdk.kotlin.services.ecr.model.BatchGetImageRequest
import aws.sdk.kotlin.services.ecr.model.BatchGetRepositoryScanningConfigurationRequest
import aws.sdk.kotlin.services.ecr.model.CompleteLayerUploadRequest
import aws.sdk.kotlin.services.ecr.model.CreatePullThroughCacheRuleRequest
import aws.sdk.kotlin.services.ecr.model.CreateRepositoryRequest
import aws.sdk.kotlin.services.ecr.model.DeleteLifecyclePolicyRequest
import aws.sdk.kotlin.services.ecr.model.DeletePullThroughCacheRuleRequest
import aws.sdk.kotlin.services.ecr.model.DeleteRegistryPolicyRequest
import aws.sdk.kotlin.services.ecr.model.DeleteRepositoryPolicyRequest
import aws.sdk.kotlin.services.ecr.model.DeleteRepositoryRequest
import aws.sdk.kotlin.services.ecr.model.DescribeImageReplicationStatusRequest
import aws.sdk.kotlin.services.ecr.model.DescribeImageScanFindingsRequest
import aws.sdk.kotlin.services.ecr.model.DescribeImagesRequest
import aws.sdk.kotlin.services.ecr.model.DescribePullThroughCacheRulesRequest
import aws.sdk.kotlin.services.ecr.model.DescribeRegistryRequest
import aws.sdk.kotlin.services.ecr.model.DescribeRepositoriesRequest
import aws.sdk.kotlin.services.ecr.model.GetAuthorizationTokenRequest
import aws.sdk.kotlin.services.ecr.model.GetDownloadUrlForLayerRequest
import aws.sdk.kotlin.services.ecr.model.GetLifecyclePolicyPreviewRequest
import aws.sdk.kotlin.services.ecr.model.GetLifecyclePolicyRequest
import aws.sdk.kotlin.services.ecr.model.GetRegistryPolicyRequest
import aws.sdk.kotlin.services.ecr.model.GetRegistryScanningConfigurationRequest
import aws.sdk.kotlin.services.ecr.model.GetRepositoryPolicyRequest
import aws.sdk.kotlin.services.ecr.model.InitiateLayerUploadRequest
import aws.sdk.kotlin.services.ecr.model.ListImagesRequest
import aws.sdk.kotlin.services.ecr.model.ListTagsForResourceRequest
import aws.sdk.kotlin.services.ecr.model.PutImageRequest
import aws.sdk.kotlin.services.ecr.model.PutImageScanningConfigurationRequest
import aws.sdk.kotlin.services.ecr.model.PutImageTagMutabilityRequest
import aws.sdk.kotlin.services.ecr.model.PutLifecyclePolicyRequest
import aws.sdk.kotlin.services.ecr.model.PutRegistryPolicyRequest
import aws.sdk.kotlin.services.ecr.model.PutRegistryScanningConfigurationRequest
import aws.sdk.kotlin.services.ecr.model.PutReplicationConfigurationRequest
import aws.sdk.kotlin.services.ecr.model.SetRepositoryPolicyRequest
import aws.sdk.kotlin.services.ecr.model.StartImageScanRequest
import aws.sdk.kotlin.services.ecr.model.StartLifecyclePolicyPreviewRequest
import aws.sdk.kotlin.services.ecr.model.TagResourceRequest
import aws.sdk.kotlin.services.ecr.model.UntagResourceRequest
import aws.sdk.kotlin.services.ecr.model.UploadLayerPartRequest
import aws.sdk.kotlin.services.ecr.transform.*
import aws.smithy.kotlin.runtime.auth.awssigning.AwsHttpSigner
import aws.smithy.kotlin.runtime.auth.awssigning.AwsSigningAttributes
import aws.smithy.kotlin.runtime.awsprotocol.json.AwsJsonProtocol
import aws.smithy.kotlin.runtime.client.SdkClientOption
import aws.smithy.kotlin.runtime.http.SdkHttpClient
import aws.smithy.kotlin.runtime.http.operation.SdkHttpOperation
import aws.smithy.kotlin.runtime.http.operation.context
import aws.smithy.kotlin.runtime.http.operation.roundTrip
import aws.smithy.kotlin.runtime.http.operation.sdkRequestId
import aws.smithy.kotlin.runtime.io.SdkManagedGroup
import aws.smithy.kotlin.runtime.io.addIfManaged
import aws.smithy.kotlin.runtime.operation.ExecutionContext
import aws.smithy.kotlin.runtime.tracing.withRootTraceSpan
import aws.smithy.kotlin.runtime.util.putIfAbsent
import kotlin.coroutines.coroutineContext
public const val ServiceId: String = "ECR"
public const val ServiceApiVersion: String = "2015-09-21"
public const val SdkVersion: String = "0.21.3-beta"
internal class DefaultEcrClient(override val config: EcrClient.Config) : EcrClient {
private val managedResources = SdkManagedGroup()
private val client = SdkHttpClient(config.httpClientEngine)
init {
managedResources.addIfManaged(config.httpClientEngine)
managedResources.addIfManaged(config.credentialsProvider)
}
private val awsUserAgentMetadata = AwsUserAgentMetadata.fromEnvironment(ApiMetadata(ServiceId, SdkVersion))
/**
* Checks the availability of one or more image layers in a repository.
*
* 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.
*/
override suspend fun batchCheckLayerAvailability(input: BatchCheckLayerAvailabilityRequest): BatchCheckLayerAvailabilityResponse {
val op = SdkHttpOperation.build {
serializer = BatchCheckLayerAvailabilityOperationSerializer()
deserializer = BatchCheckLayerAvailabilityOperationDeserializer()
context {
expectedHttpStatus = 200
operationName = "BatchCheckLayerAvailability"
}
}
op.execution.retryStrategy = config.retryStrategy
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(ResolveEndpoint(config.endpointProvider) {
bindAwsBuiltins(config)
})
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AmazonEC2ContainerRegistry_V20150921", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.execution.signer = AwsHttpSigner {
this.signer = config.signer
this.credentialsProvider = config.credentialsProvider
this.service = "ecr"
}
op.interceptors.addAll(config.interceptors)
val rootSpan = config.tracer.createRootSpan("BatchCheckLayerAvailability-${op.context.sdkRequestId}")
return coroutineContext.withRootTraceSpan(rootSpan) {
op.roundTrip(client, input)
}
}
/**
* Deletes a list of specified images within a repository. 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 image's digest in your request.
*/
override suspend fun batchDeleteImage(input: BatchDeleteImageRequest): BatchDeleteImageResponse {
val op = SdkHttpOperation.build {
serializer = BatchDeleteImageOperationSerializer()
deserializer = BatchDeleteImageOperationDeserializer()
context {
expectedHttpStatus = 200
operationName = "BatchDeleteImage"
}
}
op.execution.retryStrategy = config.retryStrategy
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(ResolveEndpoint(config.endpointProvider) {
bindAwsBuiltins(config)
})
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AmazonEC2ContainerRegistry_V20150921", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.execution.signer = AwsHttpSigner {
this.signer = config.signer
this.credentialsProvider = config.credentialsProvider
this.service = "ecr"
}
op.interceptors.addAll(config.interceptors)
val rootSpan = config.tracer.createRootSpan("BatchDeleteImage-${op.context.sdkRequestId}")
return coroutineContext.withRootTraceSpan(rootSpan) {
op.roundTrip(client, input)
}
}
/**
* Gets detailed information for an image. Images are specified with either an `imageTag` or `imageDigest`.
*
* When an image is pulled, the BatchGetImage API is called once to retrieve the image manifest.
*/
override suspend fun batchGetImage(input: BatchGetImageRequest): BatchGetImageResponse {
val op = SdkHttpOperation.build {
serializer = BatchGetImageOperationSerializer()
deserializer = BatchGetImageOperationDeserializer()
context {
expectedHttpStatus = 200
operationName = "BatchGetImage"
}
}
op.execution.retryStrategy = config.retryStrategy
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(ResolveEndpoint(config.endpointProvider) {
bindAwsBuiltins(config)
})
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AmazonEC2ContainerRegistry_V20150921", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.execution.signer = AwsHttpSigner {
this.signer = config.signer
this.credentialsProvider = config.credentialsProvider
this.service = "ecr"
}
op.interceptors.addAll(config.interceptors)
val rootSpan = config.tracer.createRootSpan("BatchGetImage-${op.context.sdkRequestId}")
return coroutineContext.withRootTraceSpan(rootSpan) {
op.roundTrip(client, input)
}
}
/**
* Gets the scanning configuration for one or more repositories.
*/
override suspend fun batchGetRepositoryScanningConfiguration(input: BatchGetRepositoryScanningConfigurationRequest): BatchGetRepositoryScanningConfigurationResponse {
val op = SdkHttpOperation.build {
serializer = BatchGetRepositoryScanningConfigurationOperationSerializer()
deserializer = BatchGetRepositoryScanningConfigurationOperationDeserializer()
context {
expectedHttpStatus = 200
operationName = "BatchGetRepositoryScanningConfiguration"
}
}
op.execution.retryStrategy = config.retryStrategy
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(ResolveEndpoint(config.endpointProvider) {
bindAwsBuiltins(config)
})
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AmazonEC2ContainerRegistry_V20150921", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.execution.signer = AwsHttpSigner {
this.signer = config.signer
this.credentialsProvider = config.credentialsProvider
this.service = "ecr"
}
op.interceptors.addAll(config.interceptors)
val rootSpan = config.tracer.createRootSpan("BatchGetRepositoryScanningConfiguration-${op.context.sdkRequestId}")
return coroutineContext.withRootTraceSpan(rootSpan) {
op.roundTrip(client, input)
}
}
/**
* 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.
*
* When an image is pushed, the CompleteLayerUpload API is called once per each new image layer to verify that the upload has completed.
*
* 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.
*/
override suspend fun completeLayerUpload(input: CompleteLayerUploadRequest): CompleteLayerUploadResponse {
val op = SdkHttpOperation.build {
serializer = CompleteLayerUploadOperationSerializer()
deserializer = CompleteLayerUploadOperationDeserializer()
context {
expectedHttpStatus = 200
operationName = "CompleteLayerUpload"
}
}
op.execution.retryStrategy = config.retryStrategy
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(ResolveEndpoint(config.endpointProvider) {
bindAwsBuiltins(config)
})
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AmazonEC2ContainerRegistry_V20150921", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.execution.signer = AwsHttpSigner {
this.signer = config.signer
this.credentialsProvider = config.credentialsProvider
this.service = "ecr"
}
op.interceptors.addAll(config.interceptors)
val rootSpan = config.tracer.createRootSpan("CompleteLayerUpload-${op.context.sdkRequestId}")
return coroutineContext.withRootTraceSpan(rootSpan) {
op.roundTrip(client, input)
}
}
/**
* Creates a pull through cache rule. A pull through cache rule provides a way to cache images from an external public registry in your Amazon ECR private registry.
*/
override suspend fun createPullThroughCacheRule(input: CreatePullThroughCacheRuleRequest): CreatePullThroughCacheRuleResponse {
val op = SdkHttpOperation.build {
serializer = CreatePullThroughCacheRuleOperationSerializer()
deserializer = CreatePullThroughCacheRuleOperationDeserializer()
context {
expectedHttpStatus = 200
operationName = "CreatePullThroughCacheRule"
}
}
op.execution.retryStrategy = config.retryStrategy
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(ResolveEndpoint(config.endpointProvider) {
bindAwsBuiltins(config)
})
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AmazonEC2ContainerRegistry_V20150921", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.execution.signer = AwsHttpSigner {
this.signer = config.signer
this.credentialsProvider = config.credentialsProvider
this.service = "ecr"
}
op.interceptors.addAll(config.interceptors)
val rootSpan = config.tracer.createRootSpan("CreatePullThroughCacheRule-${op.context.sdkRequestId}")
return coroutineContext.withRootTraceSpan(rootSpan) {
op.roundTrip(client, input)
}
}
/**
* Creates a repository. For more information, see [Amazon ECR repositories](https://docs.aws.amazon.com/AmazonECR/latest/userguide/Repositories.html) in the *Amazon Elastic Container Registry User Guide*.
*/
override suspend fun createRepository(input: CreateRepositoryRequest): CreateRepositoryResponse {
val op = SdkHttpOperation.build {
serializer = CreateRepositoryOperationSerializer()
deserializer = CreateRepositoryOperationDeserializer()
context {
expectedHttpStatus = 200
operationName = "CreateRepository"
}
}
op.execution.retryStrategy = config.retryStrategy
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(ResolveEndpoint(config.endpointProvider) {
bindAwsBuiltins(config)
})
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AmazonEC2ContainerRegistry_V20150921", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.execution.signer = AwsHttpSigner {
this.signer = config.signer
this.credentialsProvider = config.credentialsProvider
this.service = "ecr"
}
op.interceptors.addAll(config.interceptors)
val rootSpan = config.tracer.createRootSpan("CreateRepository-${op.context.sdkRequestId}")
return coroutineContext.withRootTraceSpan(rootSpan) {
op.roundTrip(client, input)
}
}
/**
* Deletes the lifecycle policy associated with the specified repository.
*/
override suspend fun deleteLifecyclePolicy(input: DeleteLifecyclePolicyRequest): DeleteLifecyclePolicyResponse {
val op = SdkHttpOperation.build {
serializer = DeleteLifecyclePolicyOperationSerializer()
deserializer = DeleteLifecyclePolicyOperationDeserializer()
context {
expectedHttpStatus = 200
operationName = "DeleteLifecyclePolicy"
}
}
op.execution.retryStrategy = config.retryStrategy
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(ResolveEndpoint(config.endpointProvider) {
bindAwsBuiltins(config)
})
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AmazonEC2ContainerRegistry_V20150921", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.execution.signer = AwsHttpSigner {
this.signer = config.signer
this.credentialsProvider = config.credentialsProvider
this.service = "ecr"
}
op.interceptors.addAll(config.interceptors)
val rootSpan = config.tracer.createRootSpan("DeleteLifecyclePolicy-${op.context.sdkRequestId}")
return coroutineContext.withRootTraceSpan(rootSpan) {
op.roundTrip(client, input)
}
}
/**
* Deletes a pull through cache rule.
*/
override suspend fun deletePullThroughCacheRule(input: DeletePullThroughCacheRuleRequest): DeletePullThroughCacheRuleResponse {
val op = SdkHttpOperation.build {
serializer = DeletePullThroughCacheRuleOperationSerializer()
deserializer = DeletePullThroughCacheRuleOperationDeserializer()
context {
expectedHttpStatus = 200
operationName = "DeletePullThroughCacheRule"
}
}
op.execution.retryStrategy = config.retryStrategy
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(ResolveEndpoint(config.endpointProvider) {
bindAwsBuiltins(config)
})
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AmazonEC2ContainerRegistry_V20150921", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.execution.signer = AwsHttpSigner {
this.signer = config.signer
this.credentialsProvider = config.credentialsProvider
this.service = "ecr"
}
op.interceptors.addAll(config.interceptors)
val rootSpan = config.tracer.createRootSpan("DeletePullThroughCacheRule-${op.context.sdkRequestId}")
return coroutineContext.withRootTraceSpan(rootSpan) {
op.roundTrip(client, input)
}
}
/**
* Deletes the registry permissions policy.
*/
override suspend fun deleteRegistryPolicy(input: DeleteRegistryPolicyRequest): DeleteRegistryPolicyResponse {
val op = SdkHttpOperation.build {
serializer = DeleteRegistryPolicyOperationSerializer()
deserializer = DeleteRegistryPolicyOperationDeserializer()
context {
expectedHttpStatus = 200
operationName = "DeleteRegistryPolicy"
}
}
op.execution.retryStrategy = config.retryStrategy
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(ResolveEndpoint(config.endpointProvider) {
bindAwsBuiltins(config)
})
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AmazonEC2ContainerRegistry_V20150921", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.execution.signer = AwsHttpSigner {
this.signer = config.signer
this.credentialsProvider = config.credentialsProvider
this.service = "ecr"
}
op.interceptors.addAll(config.interceptors)
val rootSpan = config.tracer.createRootSpan("DeleteRegistryPolicy-${op.context.sdkRequestId}")
return coroutineContext.withRootTraceSpan(rootSpan) {
op.roundTrip(client, input)
}
}
/**
* Deletes a repository. If the repository contains images, you must either delete all images in the repository or use the `force` option to delete the repository.
*/
override suspend fun deleteRepository(input: DeleteRepositoryRequest): DeleteRepositoryResponse {
val op = SdkHttpOperation.build {
serializer = DeleteRepositoryOperationSerializer()
deserializer = DeleteRepositoryOperationDeserializer()
context {
expectedHttpStatus = 200
operationName = "DeleteRepository"
}
}
op.execution.retryStrategy = config.retryStrategy
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(ResolveEndpoint(config.endpointProvider) {
bindAwsBuiltins(config)
})
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AmazonEC2ContainerRegistry_V20150921", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.execution.signer = AwsHttpSigner {
this.signer = config.signer
this.credentialsProvider = config.credentialsProvider
this.service = "ecr"
}
op.interceptors.addAll(config.interceptors)
val rootSpan = config.tracer.createRootSpan("DeleteRepository-${op.context.sdkRequestId}")
return coroutineContext.withRootTraceSpan(rootSpan) {
op.roundTrip(client, input)
}
}
/**
* Deletes the repository policy associated with the specified repository.
*/
override suspend fun deleteRepositoryPolicy(input: DeleteRepositoryPolicyRequest): DeleteRepositoryPolicyResponse {
val op = SdkHttpOperation.build {
serializer = DeleteRepositoryPolicyOperationSerializer()
deserializer = DeleteRepositoryPolicyOperationDeserializer()
context {
expectedHttpStatus = 200
operationName = "DeleteRepositoryPolicy"
}
}
op.execution.retryStrategy = config.retryStrategy
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(ResolveEndpoint(config.endpointProvider) {
bindAwsBuiltins(config)
})
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AmazonEC2ContainerRegistry_V20150921", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.execution.signer = AwsHttpSigner {
this.signer = config.signer
this.credentialsProvider = config.credentialsProvider
this.service = "ecr"
}
op.interceptors.addAll(config.interceptors)
val rootSpan = config.tracer.createRootSpan("DeleteRepositoryPolicy-${op.context.sdkRequestId}")
return coroutineContext.withRootTraceSpan(rootSpan) {
op.roundTrip(client, input)
}
}
/**
* Returns the replication status for a specified image.
*/
override suspend fun describeImageReplicationStatus(input: DescribeImageReplicationStatusRequest): DescribeImageReplicationStatusResponse {
val op = SdkHttpOperation.build {
serializer = DescribeImageReplicationStatusOperationSerializer()
deserializer = DescribeImageReplicationStatusOperationDeserializer()
context {
expectedHttpStatus = 200
operationName = "DescribeImageReplicationStatus"
}
}
op.execution.retryStrategy = config.retryStrategy
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(ResolveEndpoint(config.endpointProvider) {
bindAwsBuiltins(config)
})
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AmazonEC2ContainerRegistry_V20150921", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.execution.signer = AwsHttpSigner {
this.signer = config.signer
this.credentialsProvider = config.credentialsProvider
this.service = "ecr"
}
op.interceptors.addAll(config.interceptors)
val rootSpan = config.tracer.createRootSpan("DescribeImageReplicationStatus-${op.context.sdkRequestId}")
return coroutineContext.withRootTraceSpan(rootSpan) {
op.roundTrip(client, input)
}
}
/**
* Returns the scan findings for the specified image.
*/
override suspend fun describeImageScanFindings(input: DescribeImageScanFindingsRequest): DescribeImageScanFindingsResponse {
val op = SdkHttpOperation.build {
serializer = DescribeImageScanFindingsOperationSerializer()
deserializer = DescribeImageScanFindingsOperationDeserializer()
context {
expectedHttpStatus = 200
operationName = "DescribeImageScanFindings"
}
}
op.execution.retryStrategy = config.retryStrategy
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(ResolveEndpoint(config.endpointProvider) {
bindAwsBuiltins(config)
})
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AmazonEC2ContainerRegistry_V20150921", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.execution.signer = AwsHttpSigner {
this.signer = config.signer
this.credentialsProvider = config.credentialsProvider
this.service = "ecr"
}
op.interceptors.addAll(config.interceptors)
val rootSpan = config.tracer.createRootSpan("DescribeImageScanFindings-${op.context.sdkRequestId}")
return coroutineContext.withRootTraceSpan(rootSpan) {
op.roundTrip(client, input)
}
}
/**
* Returns metadata about the images in a repository.
*
* 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.
*/
override suspend fun describeImages(input: DescribeImagesRequest): DescribeImagesResponse {
val op = SdkHttpOperation.build {
serializer = DescribeImagesOperationSerializer()
deserializer = DescribeImagesOperationDeserializer()
context {
expectedHttpStatus = 200
operationName = "DescribeImages"
}
}
op.execution.retryStrategy = config.retryStrategy
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(ResolveEndpoint(config.endpointProvider) {
bindAwsBuiltins(config)
})
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AmazonEC2ContainerRegistry_V20150921", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.execution.signer = AwsHttpSigner {
this.signer = config.signer
this.credentialsProvider = config.credentialsProvider
this.service = "ecr"
}
op.interceptors.addAll(config.interceptors)
val rootSpan = config.tracer.createRootSpan("DescribeImages-${op.context.sdkRequestId}")
return coroutineContext.withRootTraceSpan(rootSpan) {
op.roundTrip(client, input)
}
}
/**
* Returns the pull through cache rules for a registry.
*/
override suspend fun describePullThroughCacheRules(input: DescribePullThroughCacheRulesRequest): DescribePullThroughCacheRulesResponse {
val op = SdkHttpOperation.build {
serializer = DescribePullThroughCacheRulesOperationSerializer()
deserializer = DescribePullThroughCacheRulesOperationDeserializer()
context {
expectedHttpStatus = 200
operationName = "DescribePullThroughCacheRules"
}
}
op.execution.retryStrategy = config.retryStrategy
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(ResolveEndpoint(config.endpointProvider) {
bindAwsBuiltins(config)
})
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AmazonEC2ContainerRegistry_V20150921", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.execution.signer = AwsHttpSigner {
this.signer = config.signer
this.credentialsProvider = config.credentialsProvider
this.service = "ecr"
}
op.interceptors.addAll(config.interceptors)
val rootSpan = config.tracer.createRootSpan("DescribePullThroughCacheRules-${op.context.sdkRequestId}")
return coroutineContext.withRootTraceSpan(rootSpan) {
op.roundTrip(client, input)
}
}
/**
* Describes the settings for a registry. The replication configuration for a repository can be created or updated with the PutReplicationConfiguration API action.
*/
override suspend fun describeRegistry(input: DescribeRegistryRequest): DescribeRegistryResponse {
val op = SdkHttpOperation.build {
serializer = DescribeRegistryOperationSerializer()
deserializer = DescribeRegistryOperationDeserializer()
context {
expectedHttpStatus = 200
operationName = "DescribeRegistry"
}
}
op.execution.retryStrategy = config.retryStrategy
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(ResolveEndpoint(config.endpointProvider) {
bindAwsBuiltins(config)
})
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AmazonEC2ContainerRegistry_V20150921", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.execution.signer = AwsHttpSigner {
this.signer = config.signer
this.credentialsProvider = config.credentialsProvider
this.service = "ecr"
}
op.interceptors.addAll(config.interceptors)
val rootSpan = config.tracer.createRootSpan("DescribeRegistry-${op.context.sdkRequestId}")
return coroutineContext.withRootTraceSpan(rootSpan) {
op.roundTrip(client, input)
}
}
/**
* Describes image repositories in a registry.
*/
override suspend fun describeRepositories(input: DescribeRepositoriesRequest): DescribeRepositoriesResponse {
val op = SdkHttpOperation.build {
serializer = DescribeRepositoriesOperationSerializer()
deserializer = DescribeRepositoriesOperationDeserializer()
context {
expectedHttpStatus = 200
operationName = "DescribeRepositories"
}
}
op.execution.retryStrategy = config.retryStrategy
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(ResolveEndpoint(config.endpointProvider) {
bindAwsBuiltins(config)
})
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AmazonEC2ContainerRegistry_V20150921", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.execution.signer = AwsHttpSigner {
this.signer = config.signer
this.credentialsProvider = config.credentialsProvider
this.service = "ecr"
}
op.interceptors.addAll(config.interceptors)
val rootSpan = config.tracer.createRootSpan("DescribeRepositories-${op.context.sdkRequestId}")
return coroutineContext.withRootTraceSpan(rootSpan) {
op.roundTrip(client, input)
}
}
/**
* Retrieves an authorization token. An authorization token represents your IAM authentication credentials and can be used to access any Amazon ECR registry that your IAM principal has access to. The authorization token is valid for 12 hours.
*
* The `authorizationToken` returned is a base64 encoded string that can be decoded and used in a `docker login` command to authenticate to a registry. The CLI offers an `get-login-password` command that simplifies the login process. For more information, see [Registry authentication](https://docs.aws.amazon.com/AmazonECR/latest/userguide/Registries.html#registry_auth) in the *Amazon Elastic Container Registry User Guide*.
*/
override suspend fun getAuthorizationToken(input: GetAuthorizationTokenRequest): GetAuthorizationTokenResponse {
val op = SdkHttpOperation.build {
serializer = GetAuthorizationTokenOperationSerializer()
deserializer = GetAuthorizationTokenOperationDeserializer()
context {
expectedHttpStatus = 200
operationName = "GetAuthorizationToken"
}
}
op.execution.retryStrategy = config.retryStrategy
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(ResolveEndpoint(config.endpointProvider) {
bindAwsBuiltins(config)
})
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AmazonEC2ContainerRegistry_V20150921", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.execution.signer = AwsHttpSigner {
this.signer = config.signer
this.credentialsProvider = config.credentialsProvider
this.service = "ecr"
}
op.interceptors.addAll(config.interceptors)
val rootSpan = config.tracer.createRootSpan("GetAuthorizationToken-${op.context.sdkRequestId}")
return coroutineContext.withRootTraceSpan(rootSpan) {
op.roundTrip(client, input)
}
}
/**
* 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.
*
* When an image is pulled, the GetDownloadUrlForLayer API is called once per image layer that is not already cached.
*
* 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.
*/
override suspend fun getDownloadUrlForLayer(input: GetDownloadUrlForLayerRequest): GetDownloadUrlForLayerResponse {
val op = SdkHttpOperation.build {
serializer = GetDownloadUrlForLayerOperationSerializer()
deserializer = GetDownloadUrlForLayerOperationDeserializer()
context {
expectedHttpStatus = 200
operationName = "GetDownloadUrlForLayer"
}
}
op.execution.retryStrategy = config.retryStrategy
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(ResolveEndpoint(config.endpointProvider) {
bindAwsBuiltins(config)
})
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AmazonEC2ContainerRegistry_V20150921", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.execution.signer = AwsHttpSigner {
this.signer = config.signer
this.credentialsProvider = config.credentialsProvider
this.service = "ecr"
}
op.interceptors.addAll(config.interceptors)
val rootSpan = config.tracer.createRootSpan("GetDownloadUrlForLayer-${op.context.sdkRequestId}")
return coroutineContext.withRootTraceSpan(rootSpan) {
op.roundTrip(client, input)
}
}
/**
* Retrieves the lifecycle policy for the specified repository.
*/
override suspend fun getLifecyclePolicy(input: GetLifecyclePolicyRequest): GetLifecyclePolicyResponse {
val op = SdkHttpOperation.build {
serializer = GetLifecyclePolicyOperationSerializer()
deserializer = GetLifecyclePolicyOperationDeserializer()
context {
expectedHttpStatus = 200
operationName = "GetLifecyclePolicy"
}
}
op.execution.retryStrategy = config.retryStrategy
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(ResolveEndpoint(config.endpointProvider) {
bindAwsBuiltins(config)
})
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AmazonEC2ContainerRegistry_V20150921", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.execution.signer = AwsHttpSigner {
this.signer = config.signer
this.credentialsProvider = config.credentialsProvider
this.service = "ecr"
}
op.interceptors.addAll(config.interceptors)
val rootSpan = config.tracer.createRootSpan("GetLifecyclePolicy-${op.context.sdkRequestId}")
return coroutineContext.withRootTraceSpan(rootSpan) {
op.roundTrip(client, input)
}
}
/**
* Retrieves the results of the lifecycle policy preview request for the specified repository.
*/
override suspend fun getLifecyclePolicyPreview(input: GetLifecyclePolicyPreviewRequest): GetLifecyclePolicyPreviewResponse {
val op = SdkHttpOperation.build {
serializer = GetLifecyclePolicyPreviewOperationSerializer()
deserializer = GetLifecyclePolicyPreviewOperationDeserializer()
context {
expectedHttpStatus = 200
operationName = "GetLifecyclePolicyPreview"
}
}
op.execution.retryStrategy = config.retryStrategy
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(ResolveEndpoint(config.endpointProvider) {
bindAwsBuiltins(config)
})
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AmazonEC2ContainerRegistry_V20150921", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.execution.signer = AwsHttpSigner {
this.signer = config.signer
this.credentialsProvider = config.credentialsProvider
this.service = "ecr"
}
op.interceptors.addAll(config.interceptors)
val rootSpan = config.tracer.createRootSpan("GetLifecyclePolicyPreview-${op.context.sdkRequestId}")
return coroutineContext.withRootTraceSpan(rootSpan) {
op.roundTrip(client, input)
}
}
/**
* Retrieves the permissions policy for a registry.
*/
override suspend fun getRegistryPolicy(input: GetRegistryPolicyRequest): GetRegistryPolicyResponse {
val op = SdkHttpOperation.build {
serializer = GetRegistryPolicyOperationSerializer()
deserializer = GetRegistryPolicyOperationDeserializer()
context {
expectedHttpStatus = 200
operationName = "GetRegistryPolicy"
}
}
op.execution.retryStrategy = config.retryStrategy
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(ResolveEndpoint(config.endpointProvider) {
bindAwsBuiltins(config)
})
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AmazonEC2ContainerRegistry_V20150921", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.execution.signer = AwsHttpSigner {
this.signer = config.signer
this.credentialsProvider = config.credentialsProvider
this.service = "ecr"
}
op.interceptors.addAll(config.interceptors)
val rootSpan = config.tracer.createRootSpan("GetRegistryPolicy-${op.context.sdkRequestId}")
return coroutineContext.withRootTraceSpan(rootSpan) {
op.roundTrip(client, input)
}
}
/**
* Retrieves the scanning configuration for a registry.
*/
override suspend fun getRegistryScanningConfiguration(input: GetRegistryScanningConfigurationRequest): GetRegistryScanningConfigurationResponse {
val op = SdkHttpOperation.build {
serializer = GetRegistryScanningConfigurationOperationSerializer()
deserializer = GetRegistryScanningConfigurationOperationDeserializer()
context {
expectedHttpStatus = 200
operationName = "GetRegistryScanningConfiguration"
}
}
op.execution.retryStrategy = config.retryStrategy
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(ResolveEndpoint(config.endpointProvider) {
bindAwsBuiltins(config)
})
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AmazonEC2ContainerRegistry_V20150921", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.execution.signer = AwsHttpSigner {
this.signer = config.signer
this.credentialsProvider = config.credentialsProvider
this.service = "ecr"
}
op.interceptors.addAll(config.interceptors)
val rootSpan = config.tracer.createRootSpan("GetRegistryScanningConfiguration-${op.context.sdkRequestId}")
return coroutineContext.withRootTraceSpan(rootSpan) {
op.roundTrip(client, input)
}
}
/**
* Retrieves the repository policy for the specified repository.
*/
override suspend fun getRepositoryPolicy(input: GetRepositoryPolicyRequest): GetRepositoryPolicyResponse {
val op = SdkHttpOperation.build {
serializer = GetRepositoryPolicyOperationSerializer()
deserializer = GetRepositoryPolicyOperationDeserializer()
context {
expectedHttpStatus = 200
operationName = "GetRepositoryPolicy"
}
}
op.execution.retryStrategy = config.retryStrategy
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(ResolveEndpoint(config.endpointProvider) {
bindAwsBuiltins(config)
})
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AmazonEC2ContainerRegistry_V20150921", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.execution.signer = AwsHttpSigner {
this.signer = config.signer
this.credentialsProvider = config.credentialsProvider
this.service = "ecr"
}
op.interceptors.addAll(config.interceptors)
val rootSpan = config.tracer.createRootSpan("GetRepositoryPolicy-${op.context.sdkRequestId}")
return coroutineContext.withRootTraceSpan(rootSpan) {
op.roundTrip(client, input)
}
}
/**
* Notifies Amazon ECR that you intend to upload an image layer.
*
* When an image is pushed, the InitiateLayerUpload API is called once per image layer that has not already been uploaded. Whether or not an image layer has been uploaded 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.
*/
override suspend fun initiateLayerUpload(input: InitiateLayerUploadRequest): InitiateLayerUploadResponse {
val op = SdkHttpOperation.build {
serializer = InitiateLayerUploadOperationSerializer()
deserializer = InitiateLayerUploadOperationDeserializer()
context {
expectedHttpStatus = 200
operationName = "InitiateLayerUpload"
}
}
op.execution.retryStrategy = config.retryStrategy
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(ResolveEndpoint(config.endpointProvider) {
bindAwsBuiltins(config)
})
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AmazonEC2ContainerRegistry_V20150921", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.execution.signer = AwsHttpSigner {
this.signer = config.signer
this.credentialsProvider = config.credentialsProvider
this.service = "ecr"
}
op.interceptors.addAll(config.interceptors)
val rootSpan = config.tracer.createRootSpan("InitiateLayerUpload-${op.context.sdkRequestId}")
return coroutineContext.withRootTraceSpan(rootSpan) {
op.roundTrip(client, input)
}
}
/**
* Lists all the image IDs for the specified repository.
*
* You can filter images based on whether or not they are tagged by using the `tagStatus` filter and specifying either `TAGGED`, `UNTAGGED` or `ANY`. 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.
*/
override suspend fun listImages(input: ListImagesRequest): ListImagesResponse {
val op = SdkHttpOperation.build {
serializer = ListImagesOperationSerializer()
deserializer = ListImagesOperationDeserializer()
context {
expectedHttpStatus = 200
operationName = "ListImages"
}
}
op.execution.retryStrategy = config.retryStrategy
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(ResolveEndpoint(config.endpointProvider) {
bindAwsBuiltins(config)
})
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AmazonEC2ContainerRegistry_V20150921", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.execution.signer = AwsHttpSigner {
this.signer = config.signer
this.credentialsProvider = config.credentialsProvider
this.service = "ecr"
}
op.interceptors.addAll(config.interceptors)
val rootSpan = config.tracer.createRootSpan("ListImages-${op.context.sdkRequestId}")
return coroutineContext.withRootTraceSpan(rootSpan) {
op.roundTrip(client, input)
}
}
/**
* List the tags for an Amazon ECR resource.
*/
override suspend fun listTagsForResource(input: ListTagsForResourceRequest): ListTagsForResourceResponse {
val op = SdkHttpOperation.build {
serializer = ListTagsForResourceOperationSerializer()
deserializer = ListTagsForResourceOperationDeserializer()
context {
expectedHttpStatus = 200
operationName = "ListTagsForResource"
}
}
op.execution.retryStrategy = config.retryStrategy
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(ResolveEndpoint(config.endpointProvider) {
bindAwsBuiltins(config)
})
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AmazonEC2ContainerRegistry_V20150921", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.execution.signer = AwsHttpSigner {
this.signer = config.signer
this.credentialsProvider = config.credentialsProvider
this.service = "ecr"
}
op.interceptors.addAll(config.interceptors)
val rootSpan = config.tracer.createRootSpan("ListTagsForResource-${op.context.sdkRequestId}")
return coroutineContext.withRootTraceSpan(rootSpan) {
op.roundTrip(client, input)
}
}
/**
* Creates or updates the image manifest and tags 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 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.
*/
override suspend fun putImage(input: PutImageRequest): PutImageResponse {
val op = SdkHttpOperation.build {
serializer = PutImageOperationSerializer()
deserializer = PutImageOperationDeserializer()
context {
expectedHttpStatus = 200
operationName = "PutImage"
}
}
op.execution.retryStrategy = config.retryStrategy
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(ResolveEndpoint(config.endpointProvider) {
bindAwsBuiltins(config)
})
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AmazonEC2ContainerRegistry_V20150921", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.execution.signer = AwsHttpSigner {
this.signer = config.signer
this.credentialsProvider = config.credentialsProvider
this.service = "ecr"
}
op.interceptors.addAll(config.interceptors)
val rootSpan = config.tracer.createRootSpan("PutImage-${op.context.sdkRequestId}")
return coroutineContext.withRootTraceSpan(rootSpan) {
op.roundTrip(client, input)
}
}
/**
* The `PutImageScanningConfiguration` API is being deprecated, in favor of specifying the image scanning configuration at the registry level. For more information, see PutRegistryScanningConfiguration.
*
* Updates the image scanning configuration for the specified repository.
*/
override suspend fun putImageScanningConfiguration(input: PutImageScanningConfigurationRequest): PutImageScanningConfigurationResponse {
val op = SdkHttpOperation.build {
serializer = PutImageScanningConfigurationOperationSerializer()
deserializer = PutImageScanningConfigurationOperationDeserializer()
context {
expectedHttpStatus = 200
operationName = "PutImageScanningConfiguration"
}
}
op.execution.retryStrategy = config.retryStrategy
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(ResolveEndpoint(config.endpointProvider) {
bindAwsBuiltins(config)
})
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AmazonEC2ContainerRegistry_V20150921", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.execution.signer = AwsHttpSigner {
this.signer = config.signer
this.credentialsProvider = config.credentialsProvider
this.service = "ecr"
}
op.interceptors.addAll(config.interceptors)
val rootSpan = config.tracer.createRootSpan("PutImageScanningConfiguration-${op.context.sdkRequestId}")
return coroutineContext.withRootTraceSpan(rootSpan) {
op.roundTrip(client, input)
}
}
/**
* Updates the image tag mutability settings for the specified repository. For more information, see [Image tag mutability](https://docs.aws.amazon.com/AmazonECR/latest/userguide/image-tag-mutability.html) in the *Amazon Elastic Container Registry User Guide*.
*/
override suspend fun putImageTagMutability(input: PutImageTagMutabilityRequest): PutImageTagMutabilityResponse {
val op = SdkHttpOperation.build {
serializer = PutImageTagMutabilityOperationSerializer()
deserializer = PutImageTagMutabilityOperationDeserializer()
context {
expectedHttpStatus = 200
operationName = "PutImageTagMutability"
}
}
op.execution.retryStrategy = config.retryStrategy
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(ResolveEndpoint(config.endpointProvider) {
bindAwsBuiltins(config)
})
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AmazonEC2ContainerRegistry_V20150921", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.execution.signer = AwsHttpSigner {
this.signer = config.signer
this.credentialsProvider = config.credentialsProvider
this.service = "ecr"
}
op.interceptors.addAll(config.interceptors)
val rootSpan = config.tracer.createRootSpan("PutImageTagMutability-${op.context.sdkRequestId}")
return coroutineContext.withRootTraceSpan(rootSpan) {
op.roundTrip(client, input)
}
}
/**
* Creates or updates the lifecycle policy for the specified repository. For more information, see [Lifecycle policy template](https://docs.aws.amazon.com/AmazonECR/latest/userguide/LifecyclePolicies.html).
*/
override suspend fun putLifecyclePolicy(input: PutLifecyclePolicyRequest): PutLifecyclePolicyResponse {
val op = SdkHttpOperation.build {
serializer = PutLifecyclePolicyOperationSerializer()
deserializer = PutLifecyclePolicyOperationDeserializer()
context {
expectedHttpStatus = 200
operationName = "PutLifecyclePolicy"
}
}
op.execution.retryStrategy = config.retryStrategy
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(ResolveEndpoint(config.endpointProvider) {
bindAwsBuiltins(config)
})
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AmazonEC2ContainerRegistry_V20150921", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.execution.signer = AwsHttpSigner {
this.signer = config.signer
this.credentialsProvider = config.credentialsProvider
this.service = "ecr"
}
op.interceptors.addAll(config.interceptors)
val rootSpan = config.tracer.createRootSpan("PutLifecyclePolicy-${op.context.sdkRequestId}")
return coroutineContext.withRootTraceSpan(rootSpan) {
op.roundTrip(client, input)
}
}
/**
* Creates or updates the permissions policy for your registry.
*
* A registry policy is used to specify permissions for another Amazon Web Services account and is used when configuring cross-account replication. For more information, see [Registry permissions](https://docs.aws.amazon.com/AmazonECR/latest/userguide/registry-permissions.html) in the *Amazon Elastic Container Registry User Guide*.
*/
override suspend fun putRegistryPolicy(input: PutRegistryPolicyRequest): PutRegistryPolicyResponse {
val op = SdkHttpOperation.build {
serializer = PutRegistryPolicyOperationSerializer()
deserializer = PutRegistryPolicyOperationDeserializer()
context {
expectedHttpStatus = 200
operationName = "PutRegistryPolicy"
}
}
op.execution.retryStrategy = config.retryStrategy
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(ResolveEndpoint(config.endpointProvider) {
bindAwsBuiltins(config)
})
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AmazonEC2ContainerRegistry_V20150921", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.execution.signer = AwsHttpSigner {
this.signer = config.signer
this.credentialsProvider = config.credentialsProvider
this.service = "ecr"
}
op.interceptors.addAll(config.interceptors)
val rootSpan = config.tracer.createRootSpan("PutRegistryPolicy-${op.context.sdkRequestId}")
return coroutineContext.withRootTraceSpan(rootSpan) {
op.roundTrip(client, input)
}
}
/**
* Creates or updates the scanning configuration for your private registry.
*/
override suspend fun putRegistryScanningConfiguration(input: PutRegistryScanningConfigurationRequest): PutRegistryScanningConfigurationResponse {
val op = SdkHttpOperation.build {
serializer = PutRegistryScanningConfigurationOperationSerializer()
deserializer = PutRegistryScanningConfigurationOperationDeserializer()
context {
expectedHttpStatus = 200
operationName = "PutRegistryScanningConfiguration"
}
}
op.execution.retryStrategy = config.retryStrategy
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(ResolveEndpoint(config.endpointProvider) {
bindAwsBuiltins(config)
})
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AmazonEC2ContainerRegistry_V20150921", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.execution.signer = AwsHttpSigner {
this.signer = config.signer
this.credentialsProvider = config.credentialsProvider
this.service = "ecr"
}
op.interceptors.addAll(config.interceptors)
val rootSpan = config.tracer.createRootSpan("PutRegistryScanningConfiguration-${op.context.sdkRequestId}")
return coroutineContext.withRootTraceSpan(rootSpan) {
op.roundTrip(client, input)
}
}
/**
* Creates or updates the replication configuration for a registry. The existing replication configuration for a repository can be retrieved with the DescribeRegistry API action. The first time the PutReplicationConfiguration API is called, a service-linked IAM role is created in your account for the replication process. For more information, see [Using service-linked roles for Amazon ECR](https://docs.aws.amazon.com/AmazonECR/latest/userguide/using-service-linked-roles.html) in the *Amazon Elastic Container Registry User Guide*.
*
* When configuring cross-account replication, the destination account must grant the source account permission to replicate. This permission is controlled using a registry permissions policy. For more information, see PutRegistryPolicy.
*/
override suspend fun putReplicationConfiguration(input: PutReplicationConfigurationRequest): PutReplicationConfigurationResponse {
val op = SdkHttpOperation.build {
serializer = PutReplicationConfigurationOperationSerializer()
deserializer = PutReplicationConfigurationOperationDeserializer()
context {
expectedHttpStatus = 200
operationName = "PutReplicationConfiguration"
}
}
op.execution.retryStrategy = config.retryStrategy
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(ResolveEndpoint(config.endpointProvider) {
bindAwsBuiltins(config)
})
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AmazonEC2ContainerRegistry_V20150921", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.execution.signer = AwsHttpSigner {
this.signer = config.signer
this.credentialsProvider = config.credentialsProvider
this.service = "ecr"
}
op.interceptors.addAll(config.interceptors)
val rootSpan = config.tracer.createRootSpan("PutReplicationConfiguration-${op.context.sdkRequestId}")
return coroutineContext.withRootTraceSpan(rootSpan) {
op.roundTrip(client, input)
}
}
/**
* Applies a repository policy to the specified repository to control access permissions. For more information, see [Amazon ECR Repository policies](https://docs.aws.amazon.com/AmazonECR/latest/userguide/repository-policies.html) in the *Amazon Elastic Container Registry User Guide*.
*/
override suspend fun setRepositoryPolicy(input: SetRepositoryPolicyRequest): SetRepositoryPolicyResponse {
val op = SdkHttpOperation.build {
serializer = SetRepositoryPolicyOperationSerializer()
deserializer = SetRepositoryPolicyOperationDeserializer()
context {
expectedHttpStatus = 200
operationName = "SetRepositoryPolicy"
}
}
op.execution.retryStrategy = config.retryStrategy
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(ResolveEndpoint(config.endpointProvider) {
bindAwsBuiltins(config)
})
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AmazonEC2ContainerRegistry_V20150921", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.execution.signer = AwsHttpSigner {
this.signer = config.signer
this.credentialsProvider = config.credentialsProvider
this.service = "ecr"
}
op.interceptors.addAll(config.interceptors)
val rootSpan = config.tracer.createRootSpan("SetRepositoryPolicy-${op.context.sdkRequestId}")
return coroutineContext.withRootTraceSpan(rootSpan) {
op.roundTrip(client, input)
}
}
/**
* Starts an image vulnerability scan. An image scan can only be started once per 24 hours on an individual image. This limit includes if an image was scanned on initial push. For more information, see [Image scanning](https://docs.aws.amazon.com/AmazonECR/latest/userguide/image-scanning.html) in the *Amazon Elastic Container Registry User Guide*.
*/
override suspend fun startImageScan(input: StartImageScanRequest): StartImageScanResponse {
val op = SdkHttpOperation.build {
serializer = StartImageScanOperationSerializer()
deserializer = StartImageScanOperationDeserializer()
context {
expectedHttpStatus = 200
operationName = "StartImageScan"
}
}
op.execution.retryStrategy = config.retryStrategy
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(ResolveEndpoint(config.endpointProvider) {
bindAwsBuiltins(config)
})
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AmazonEC2ContainerRegistry_V20150921", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.execution.signer = AwsHttpSigner {
this.signer = config.signer
this.credentialsProvider = config.credentialsProvider
this.service = "ecr"
}
op.interceptors.addAll(config.interceptors)
val rootSpan = config.tracer.createRootSpan("StartImageScan-${op.context.sdkRequestId}")
return coroutineContext.withRootTraceSpan(rootSpan) {
op.roundTrip(client, input)
}
}
/**
* Starts a preview of a lifecycle policy for the specified repository. This allows you to see the results before associating the lifecycle policy with the repository.
*/
override suspend fun startLifecyclePolicyPreview(input: StartLifecyclePolicyPreviewRequest): StartLifecyclePolicyPreviewResponse {
val op = SdkHttpOperation.build {
serializer = StartLifecyclePolicyPreviewOperationSerializer()
deserializer = StartLifecyclePolicyPreviewOperationDeserializer()
context {
expectedHttpStatus = 200
operationName = "StartLifecyclePolicyPreview"
}
}
op.execution.retryStrategy = config.retryStrategy
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(ResolveEndpoint(config.endpointProvider) {
bindAwsBuiltins(config)
})
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AmazonEC2ContainerRegistry_V20150921", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.execution.signer = AwsHttpSigner {
this.signer = config.signer
this.credentialsProvider = config.credentialsProvider
this.service = "ecr"
}
op.interceptors.addAll(config.interceptors)
val rootSpan = config.tracer.createRootSpan("StartLifecyclePolicyPreview-${op.context.sdkRequestId}")
return coroutineContext.withRootTraceSpan(rootSpan) {
op.roundTrip(client, input)
}
}
/**
* 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.
*/
override suspend fun tagResource(input: TagResourceRequest): TagResourceResponse {
val op = SdkHttpOperation.build {
serializer = TagResourceOperationSerializer()
deserializer = TagResourceOperationDeserializer()
context {
expectedHttpStatus = 200
operationName = "TagResource"
}
}
op.execution.retryStrategy = config.retryStrategy
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(ResolveEndpoint(config.endpointProvider) {
bindAwsBuiltins(config)
})
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AmazonEC2ContainerRegistry_V20150921", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.execution.signer = AwsHttpSigner {
this.signer = config.signer
this.credentialsProvider = config.credentialsProvider
this.service = "ecr"
}
op.interceptors.addAll(config.interceptors)
val rootSpan = config.tracer.createRootSpan("TagResource-${op.context.sdkRequestId}")
return coroutineContext.withRootTraceSpan(rootSpan) {
op.roundTrip(client, input)
}
}
/**
* Deletes specified tags from a resource.
*/
override suspend fun untagResource(input: UntagResourceRequest): UntagResourceResponse {
val op = SdkHttpOperation.build {
serializer = UntagResourceOperationSerializer()
deserializer = UntagResourceOperationDeserializer()
context {
expectedHttpStatus = 200
operationName = "UntagResource"
}
}
op.execution.retryStrategy = config.retryStrategy
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(ResolveEndpoint(config.endpointProvider) {
bindAwsBuiltins(config)
})
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AmazonEC2ContainerRegistry_V20150921", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.execution.signer = AwsHttpSigner {
this.signer = config.signer
this.credentialsProvider = config.credentialsProvider
this.service = "ecr"
}
op.interceptors.addAll(config.interceptors)
val rootSpan = config.tracer.createRootSpan("UntagResource-${op.context.sdkRequestId}")
return coroutineContext.withRootTraceSpan(rootSpan) {
op.roundTrip(client, input)
}
}
/**
* 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 (or about 20MB). The UploadLayerPart API is called once per 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.
*/
override suspend fun uploadLayerPart(input: UploadLayerPartRequest): UploadLayerPartResponse {
val op = SdkHttpOperation.build {
serializer = UploadLayerPartOperationSerializer()
deserializer = UploadLayerPartOperationDeserializer()
context {
expectedHttpStatus = 200
operationName = "UploadLayerPart"
}
}
op.execution.retryStrategy = config.retryStrategy
op.execution.retryPolicy = config.retryPolicy
mergeServiceDefaults(op.context)
op.interceptors.add(ResolveEndpoint(config.endpointProvider) {
bindAwsBuiltins(config)
})
op.install(AwsRetryHeaderMiddleware())
op.install(AwsJsonProtocol("AmazonEC2ContainerRegistry_V20150921", "1.1"))
op.install(UserAgent(awsUserAgentMetadata))
op.install(RecursionDetection())
op.execution.signer = AwsHttpSigner {
this.signer = config.signer
this.credentialsProvider = config.credentialsProvider
this.service = "ecr"
}
op.interceptors.addAll(config.interceptors)
val rootSpan = config.tracer.createRootSpan("UploadLayerPart-${op.context.sdkRequestId}")
return coroutineContext.withRootTraceSpan(rootSpan) {
op.roundTrip(client, input)
}
}
override fun close() {
managedResources.unshareAll()
}
/**
* merge the defaults configured for the service into the execution context before firing off a request
*/
private suspend fun mergeServiceDefaults(ctx: ExecutionContext) {
ctx.putIfAbsent(AwsClientOption.Region, config.region)
ctx.putIfAbsent(SdkClientOption.ClientName, config.clientName)
ctx.putIfAbsent(SdkClientOption.LogMode, config.sdkLogMode)
ctx.putIfAbsent(AwsSigningAttributes.SigningService, "ecr")
ctx.putIfAbsent(AwsSigningAttributes.Signer, config.signer)
ctx.putIfAbsent(AwsSigningAttributes.SigningRegion, config.region)
ctx.putIfAbsent(AwsSigningAttributes.CredentialsProvider, config.credentialsProvider)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy