ECRClient#
Auto-generated documentation for ECR type annotations stubs module mypy-boto3-ecr.
ECRClient#
Type annotations and code completion for boto3.client("ecr")
.
boto3 documentation
# ECRClient usage example
from boto3.session import Session
from mypy_boto3_ecr.client import ECRClient
def get_ecr_client() -> ECRClient:
return Session().client("ecr")
Exceptions#
boto3
client exceptions are generated in runtime.
This class provides code completion for boto3.client("ecr").exceptions
structure.
# Exceptions.exceptions usage example
client = boto3.client("ecr")
try:
do_something(client)
except (
client.exceptions.ClientError,
client.exceptions.EmptyUploadException,
client.exceptions.ImageAlreadyExistsException,
client.exceptions.ImageDigestDoesNotMatchException,
client.exceptions.ImageNotFoundException,
client.exceptions.ImageTagAlreadyExistsException,
client.exceptions.InvalidLayerException,
client.exceptions.InvalidLayerPartException,
client.exceptions.InvalidParameterException,
client.exceptions.InvalidTagParameterException,
client.exceptions.KmsException,
client.exceptions.LayerAlreadyExistsException,
client.exceptions.LayerInaccessibleException,
client.exceptions.LayerPartTooSmallException,
client.exceptions.LayersNotFoundException,
client.exceptions.LifecyclePolicyNotFoundException,
client.exceptions.LifecyclePolicyPreviewInProgressException,
client.exceptions.LifecyclePolicyPreviewNotFoundException,
client.exceptions.LimitExceededException,
client.exceptions.PullThroughCacheRuleAlreadyExistsException,
client.exceptions.PullThroughCacheRuleNotFoundException,
client.exceptions.ReferencedImagesNotFoundException,
client.exceptions.RegistryPolicyNotFoundException,
client.exceptions.RepositoryAlreadyExistsException,
client.exceptions.RepositoryNotEmptyException,
client.exceptions.RepositoryNotFoundException,
client.exceptions.RepositoryPolicyNotFoundException,
client.exceptions.ScanNotFoundException,
client.exceptions.SecretNotFoundException,
client.exceptions.ServerException,
client.exceptions.TooManyTagsException,
client.exceptions.UnableToAccessSecretException,
client.exceptions.UnableToDecryptSecretValueException,
client.exceptions.UnableToGetUpstreamImageException,
client.exceptions.UnableToGetUpstreamLayerException,
client.exceptions.UnsupportedImageTypeException,
client.exceptions.UnsupportedUpstreamRegistryException,
client.exceptions.UploadNotFoundException,
client.exceptions.ValidationException,
) as e:
print(e)
# Exceptions.exceptions type checking example
from mypy_boto3_ecr.client import Exceptions
def handle_error(exc: Exceptions.ClientError) -> None:
...
Methods#
batch_check_layer_availability#
Checks the availability of one or more image layers in a repository.
Type annotations and code completion for boto3.client("ecr").batch_check_layer_availability
method.
boto3 documentation
# batch_check_layer_availability method definition
def batch_check_layer_availability(
self,
*,
repositoryName: str,
layerDigests: Sequence[str],
registryId: str = ...,
) -> BatchCheckLayerAvailabilityResponseTypeDef: # (1)
...
# batch_check_layer_availability method usage example with argument unpacking
kwargs: BatchCheckLayerAvailabilityRequestRequestTypeDef = { # (1)
"repositoryName": ...,
"layerDigests": ...,
}
parent.batch_check_layer_availability(**kwargs)
batch_delete_image#
Deletes a list of specified images within a repository.
Type annotations and code completion for boto3.client("ecr").batch_delete_image
method.
boto3 documentation
# batch_delete_image method definition
def batch_delete_image(
self,
*,
repositoryName: str,
imageIds: Sequence[ImageIdentifierTypeDef], # (1)
registryId: str = ...,
) -> BatchDeleteImageResponseTypeDef: # (2)
...
# batch_delete_image method usage example with argument unpacking
kwargs: BatchDeleteImageRequestRequestTypeDef = { # (1)
"repositoryName": ...,
"imageIds": ...,
}
parent.batch_delete_image(**kwargs)
batch_get_image#
Gets detailed information for an image.
Type annotations and code completion for boto3.client("ecr").batch_get_image
method.
boto3 documentation
# batch_get_image method definition
def batch_get_image(
self,
*,
repositoryName: str,
imageIds: Sequence[ImageIdentifierTypeDef], # (1)
registryId: str = ...,
acceptedMediaTypes: Sequence[str] = ...,
) -> BatchGetImageResponseTypeDef: # (2)
...
# batch_get_image method usage example with argument unpacking
kwargs: BatchGetImageRequestRequestTypeDef = { # (1)
"repositoryName": ...,
"imageIds": ...,
}
parent.batch_get_image(**kwargs)
batch_get_repository_scanning_configuration#
Gets the scanning configuration for one or more repositories.
Type annotations and code completion for boto3.client("ecr").batch_get_repository_scanning_configuration
method.
boto3 documentation
# batch_get_repository_scanning_configuration method definition
def batch_get_repository_scanning_configuration(
self,
*,
repositoryNames: Sequence[str],
) -> BatchGetRepositoryScanningConfigurationResponseTypeDef: # (1)
...
# batch_get_repository_scanning_configuration method usage example with argument unpacking
kwargs: BatchGetRepositoryScanningConfigurationRequestRequestTypeDef = { # (1)
"repositoryNames": ...,
}
parent.batch_get_repository_scanning_configuration(**kwargs)
can_paginate#
Check if an operation can be paginated.
Type annotations and code completion for boto3.client("ecr").can_paginate
method.
boto3 documentation
# can_paginate method definition
def can_paginate(
self,
operation_name: str,
) -> bool:
...
close#
Closes underlying endpoint connections.
Type annotations and code completion for boto3.client("ecr").close
method.
boto3 documentation
# close method definition
def close(
self,
) -> None:
...
complete_layer_upload#
Informs Amazon ECR that the image layer upload has completed for a specified registry, repository name, and upload ID.
Type annotations and code completion for boto3.client("ecr").complete_layer_upload
method.
boto3 documentation
# complete_layer_upload method definition
def complete_layer_upload(
self,
*,
repositoryName: str,
uploadId: str,
layerDigests: Sequence[str],
registryId: str = ...,
) -> CompleteLayerUploadResponseTypeDef: # (1)
...
# complete_layer_upload method usage example with argument unpacking
kwargs: CompleteLayerUploadRequestRequestTypeDef = { # (1)
"repositoryName": ...,
"uploadId": ...,
"layerDigests": ...,
}
parent.complete_layer_upload(**kwargs)
create_pull_through_cache_rule#
Creates a pull through cache rule.
Type annotations and code completion for boto3.client("ecr").create_pull_through_cache_rule
method.
boto3 documentation
# create_pull_through_cache_rule method definition
def create_pull_through_cache_rule(
self,
*,
ecrRepositoryPrefix: str,
upstreamRegistryUrl: str,
registryId: str = ...,
upstreamRegistry: UpstreamRegistryType = ..., # (1)
credentialArn: str = ...,
) -> CreatePullThroughCacheRuleResponseTypeDef: # (2)
...
# create_pull_through_cache_rule method usage example with argument unpacking
kwargs: CreatePullThroughCacheRuleRequestRequestTypeDef = { # (1)
"ecrRepositoryPrefix": ...,
"upstreamRegistryUrl": ...,
}
parent.create_pull_through_cache_rule(**kwargs)
create_repository#
Creates a repository.
Type annotations and code completion for boto3.client("ecr").create_repository
method.
boto3 documentation
# create_repository method definition
def create_repository(
self,
*,
repositoryName: str,
registryId: str = ...,
tags: Sequence[TagTypeDef] = ..., # (1)
imageTagMutability: ImageTagMutabilityType = ..., # (2)
imageScanningConfiguration: ImageScanningConfigurationTypeDef = ..., # (3)
encryptionConfiguration: EncryptionConfigurationTypeDef = ..., # (4)
) -> CreateRepositoryResponseTypeDef: # (5)
...
- See TagTypeDef
- See ImageTagMutabilityType
- See ImageScanningConfigurationTypeDef
- See EncryptionConfigurationTypeDef
- See CreateRepositoryResponseTypeDef
# create_repository method usage example with argument unpacking
kwargs: CreateRepositoryRequestRequestTypeDef = { # (1)
"repositoryName": ...,
}
parent.create_repository(**kwargs)
delete_lifecycle_policy#
Deletes the lifecycle policy associated with the specified repository.
Type annotations and code completion for boto3.client("ecr").delete_lifecycle_policy
method.
boto3 documentation
# delete_lifecycle_policy method definition
def delete_lifecycle_policy(
self,
*,
repositoryName: str,
registryId: str = ...,
) -> DeleteLifecyclePolicyResponseTypeDef: # (1)
...
# delete_lifecycle_policy method usage example with argument unpacking
kwargs: DeleteLifecyclePolicyRequestRequestTypeDef = { # (1)
"repositoryName": ...,
}
parent.delete_lifecycle_policy(**kwargs)
delete_pull_through_cache_rule#
Deletes a pull through cache rule.
Type annotations and code completion for boto3.client("ecr").delete_pull_through_cache_rule
method.
boto3 documentation
# delete_pull_through_cache_rule method definition
def delete_pull_through_cache_rule(
self,
*,
ecrRepositoryPrefix: str,
registryId: str = ...,
) -> DeletePullThroughCacheRuleResponseTypeDef: # (1)
...
# delete_pull_through_cache_rule method usage example with argument unpacking
kwargs: DeletePullThroughCacheRuleRequestRequestTypeDef = { # (1)
"ecrRepositoryPrefix": ...,
}
parent.delete_pull_through_cache_rule(**kwargs)
delete_registry_policy#
Deletes the registry permissions policy.
Type annotations and code completion for boto3.client("ecr").delete_registry_policy
method.
boto3 documentation
# delete_registry_policy method definition
def delete_registry_policy(
self,
) -> DeleteRegistryPolicyResponseTypeDef: # (1)
...
delete_repository#
Deletes a repository.
Type annotations and code completion for boto3.client("ecr").delete_repository
method.
boto3 documentation
# delete_repository method definition
def delete_repository(
self,
*,
repositoryName: str,
registryId: str = ...,
force: bool = ...,
) -> DeleteRepositoryResponseTypeDef: # (1)
...
# delete_repository method usage example with argument unpacking
kwargs: DeleteRepositoryRequestRequestTypeDef = { # (1)
"repositoryName": ...,
}
parent.delete_repository(**kwargs)
delete_repository_policy#
Deletes the repository policy associated with the specified repository.
Type annotations and code completion for boto3.client("ecr").delete_repository_policy
method.
boto3 documentation
# delete_repository_policy method definition
def delete_repository_policy(
self,
*,
repositoryName: str,
registryId: str = ...,
) -> DeleteRepositoryPolicyResponseTypeDef: # (1)
...
# delete_repository_policy method usage example with argument unpacking
kwargs: DeleteRepositoryPolicyRequestRequestTypeDef = { # (1)
"repositoryName": ...,
}
parent.delete_repository_policy(**kwargs)
describe_image_replication_status#
Returns the replication status for a specified image.
Type annotations and code completion for boto3.client("ecr").describe_image_replication_status
method.
boto3 documentation
# describe_image_replication_status method definition
def describe_image_replication_status(
self,
*,
repositoryName: str,
imageId: ImageIdentifierTypeDef, # (1)
registryId: str = ...,
) -> DescribeImageReplicationStatusResponseTypeDef: # (2)
...