Skip to content

ECRClient#

Index > ECR > 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.TemplateAlreadyExistsException,
    client.exceptions.TemplateNotFoundException,
    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)
    ...
  1. See BatchCheckLayerAvailabilityResponseTypeDef
# batch_check_layer_availability method usage example with argument unpacking

kwargs: BatchCheckLayerAvailabilityRequestRequestTypeDef = {  # (1)
    "repositoryName": ...,
    "layerDigests": ...,
}

parent.batch_check_layer_availability(**kwargs)
  1. See BatchCheckLayerAvailabilityRequestRequestTypeDef

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)
    ...
  1. See ImageIdentifierTypeDef
  2. See BatchDeleteImageResponseTypeDef
# batch_delete_image method usage example with argument unpacking

kwargs: BatchDeleteImageRequestRequestTypeDef = {  # (1)
    "repositoryName": ...,
    "imageIds": ...,
}

parent.batch_delete_image(**kwargs)
  1. See BatchDeleteImageRequestRequestTypeDef

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)
    ...
  1. See ImageIdentifierTypeDef
  2. See BatchGetImageResponseTypeDef
# batch_get_image method usage example with argument unpacking

kwargs: BatchGetImageRequestRequestTypeDef = {  # (1)
    "repositoryName": ...,
    "imageIds": ...,
}

parent.batch_get_image(**kwargs)
  1. See BatchGetImageRequestRequestTypeDef

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)
    ...
  1. See BatchGetRepositoryScanningConfigurationResponseTypeDef
# batch_get_repository_scanning_configuration method usage example with argument unpacking

kwargs: BatchGetRepositoryScanningConfigurationRequestRequestTypeDef = {  # (1)
    "repositoryNames": ...,
}

parent.batch_get_repository_scanning_configuration(**kwargs)
  1. See BatchGetRepositoryScanningConfigurationRequestRequestTypeDef

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)
    ...
  1. See CompleteLayerUploadResponseTypeDef
# complete_layer_upload method usage example with argument unpacking

kwargs: CompleteLayerUploadRequestRequestTypeDef = {  # (1)
    "repositoryName": ...,
    "uploadId": ...,
    "layerDigests": ...,
}

parent.complete_layer_upload(**kwargs)
  1. See CompleteLayerUploadRequestRequestTypeDef

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)
    ...
  1. See UpstreamRegistryType
  2. See CreatePullThroughCacheRuleResponseTypeDef
# create_pull_through_cache_rule method usage example with argument unpacking

kwargs: CreatePullThroughCacheRuleRequestRequestTypeDef = {  # (1)
    "ecrRepositoryPrefix": ...,
    "upstreamRegistryUrl": ...,
}

parent.create_pull_through_cache_rule(**kwargs)
  1. See CreatePullThroughCacheRuleRequestRequestTypeDef

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)
    ...
  1. See TagTypeDef
  2. See ImageTagMutabilityType
  3. See ImageScanningConfigurationTypeDef
  4. See EncryptionConfigurationTypeDef
  5. See CreateRepositoryResponseTypeDef
# create_repository method usage example with argument unpacking

kwargs: CreateRepositoryRequestRequestTypeDef = {  # (1)
    "repositoryName": ...,
}

parent.create_repository(**kwargs)
  1. See CreateRepositoryRequestRequestTypeDef

create_repository_creation_template#

Creates a repository creation template.

Type annotations and code completion for boto3.client("ecr").create_repository_creation_template method. boto3 documentation

# create_repository_creation_template method definition

def create_repository_creation_template(
    self,
    *,
    prefix: str,
    appliedFor: Sequence[RCTAppliedForType],  # (1)
    description: str = ...,
    encryptionConfiguration: EncryptionConfigurationForRepositoryCreationTemplateTypeDef = ...,  # (2)
    resourceTags: Sequence[TagTypeDef] = ...,  # (3)
    imageTagMutability: ImageTagMutabilityType = ...,  # (4)
    repositoryPolicy: str = ...,
    lifecyclePolicy: str = ...,
    customRoleArn: str = ...,
) -> CreateRepositoryCreationTemplateResponseTypeDef:  # (5)
    ...
  1. See RCTAppliedForType
  2. See EncryptionConfigurationForRepositoryCreationTemplateTypeDef
  3. See TagTypeDef
  4. See ImageTagMutabilityType
  5. See CreateRepositoryCreationTemplateResponseTypeDef
# create_repository_creation_template method usage example with argument unpacking

kwargs: CreateRepositoryCreationTemplateRequestRequestTypeDef = {  # (1)
    "prefix": ...,
    "appliedFor": ...,
}

parent.create_repository_creation_template(**kwargs)
  1. See CreateRepositoryCreationTemplateRequestRequestTypeDef

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)
    ...
  1. See DeleteLifecyclePolicyResponseTypeDef
# delete_lifecycle_policy method usage example with argument unpacking

kwargs: DeleteLifecyclePolicyRequestRequestTypeDef = {  # (1)
    "repositoryName": ...,
}

parent.delete_lifecycle_policy(**kwargs)
  1. See DeleteLifecyclePolicyRequestRequestTypeDef

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)
    ...
  1. See DeletePullThroughCacheRuleResponseTypeDef
# delete_pull_through_cache_rule method usage example with argument unpacking

kwargs: DeletePullThroughCacheRuleRequestRequestTypeDef = {  # (1)
    "ecrRepositoryPrefix": ...,
}

parent.delete_pull_through_cache_rule(**kwargs)
  1. See DeletePullThroughCacheRuleRequestRequestTypeDef

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)
    ...
  1. See DeleteRegistryPolicyResponseTypeDef

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)
    ...
  1. See DeleteRepositoryResponseTypeDef
# delete_repository method usage example with argument unpacking

kwargs: DeleteRepositoryRequestRequestTypeDef = {  # (1)
    "repositoryName": ...,
}

parent.delete_repository(**kwargs)
  1. See DeleteRepositoryRequestRequestTypeDef

delete_repository_creation_template#

Deletes a repository creation template.

Type annotations and code completion for boto3.client("ecr").delete_repository_creation_template method. boto3 documentation

# delete_repository_creation_template method definition

def delete_repository_creation_template(
    self,
    *,
    prefix: str,
) -> DeleteRepositoryCreationTemplateResponseTypeDef:  # (1)
    ...
  1. See DeleteRepositoryCreationTemplateResponseTypeDef
# delete_repository_creation_template method usage example with argument unpacking

kwargs: DeleteRepositoryCreationTemplateRequestRequestTypeDef = {  # (1)
    "prefix": ...,
}

parent.delete_repository_creation_template(**kwargs)
  1. See DeleteRepositoryCreationTemplateRequestRequestTypeDef

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)
    ...
  1. See DeleteRepositoryPolicyResponseTypeDef
# delete_repository_policy method usage example with argument unpacking

kwargs: DeleteRepositoryPolicyRequestRequestTypeDef = {  # (1)
    "repositoryName": ...,
}

parent.delete_repository_policy(**kwargs)
  1. See DeleteRepositoryPolicyRequestRequestTypeDef

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)
    ...
  1. See ImageIdentifierTypeDef
  2. See DescribeImageReplicationStatusResponseTypeDef
# describe_image_replication_status method usage example with argument unpacking

kwargs: DescribeImageReplicationStatusRequestRequestTypeDef = {  # (1)
    "repositoryName": ...,
    "imageId": ...,
}

parent.describe_image_replication_status(**kwargs)
  1. See DescribeImageReplicationStatusRequestRequestTypeDef

describe_image_scan_findings#

Returns the scan findings for the specified image.

Type annotations and code completion for boto3.client("ecr").describe_image_scan_findings method. boto3 documentation

# describe_image_scan_findings method definition

def describe_image_scan_findings(
    self,
    *,
    repositoryName: str,
    imageId: ImageIdentifierTypeDef,  # (1)
    registryId: str = ...,
    nextToken: str = ...,
    maxResults: int = ...,
) -> DescribeImageScanFindingsResponseTypeDef:  # (2)
    ...
  1. See ImageIdentifierTypeDef
  2. See DescribeImageScanFindingsResponseTypeDef
# describe_image_scan_findings method usage example with argument unpacking

kwargs: DescribeImageScanFindingsRequestRequestTypeDef = {  # (1)
    "repositoryName": ...,
    "imageId": ...,
}

parent.describe_image_scan_findings(**kwargs)
  1. See DescribeImageScanFindingsRequestRequestTypeDef

describe_images#

Returns metadata about the images in a repository.

Type annotations and code completion for boto3.client("ecr").describe_images method. boto3 documentation

# describe_images method definition

def describe_images(
    self,
    *,
    repositoryName: str,
    registryId: str = ...,
    imageIds: Sequence[ImageIdentifierTypeDef] = ...,  # (1)
    nextToken: str = ...,
    maxResults: int = ...,
    filter: DescribeImagesFilterTypeDef = ...,  # (2)
) -> DescribeImagesResponseTypeDef:  # (3)
    ...
  1. See ImageIdentifierTypeDef
  2. See DescribeImagesFilterTypeDef
  3. See DescribeImagesResponseTypeDef
# describe_images method usage example with argument unpacking

kwargs: DescribeImagesRequestRequestTypeDef = {  # (1)
    "repositoryName": ...,
}

parent.describe_images(**kwargs)
  1. See DescribeImagesRequestRequestTypeDef

describe_pull_through_cache_rules#

Returns the pull through cache rules for a registry.

Type annotations and code completion for boto3.client("ecr").describe_pull_through_cache_rules method. boto3 documentation

# describe_pull_through_cache_rules method definition

def describe_pull_through_cache_rules(
    self,
    *,
    registryId: str = ...,
    ecrRepositoryPrefixes: Sequence[str] = ...,
    nextToken: str = ...,
    maxResults: int = ...,
) -> DescribePullThroughCacheRulesResponseTypeDef:  # (1)
    ...
  1. See DescribePullThroughCacheRulesResponseTypeDef
# describe_pull_through_cache_rules method usage example with argument unpacking

kwargs: DescribePullThroughCacheRulesRequestRequestTypeDef = {  # (1)
    "registryId": ...,
}

parent.describe_pull_through_cache_rules(**kwargs)
  1. See DescribePullThroughCacheRulesRequestRequestTypeDef

describe_registry#

Describes the settings for a registry.

Type annotations and code completion for boto3.client("ecr").describe_registry method. boto3 documentation

# describe_registry method definition

def describe_registry(
    self,
) -> DescribeRegistryResponseTypeDef:  # (1)
    ...
  1. See DescribeRegistryResponseTypeDef

describe_repositories#

Describes image repositories in a registry.

Type annotations and code completion for boto3.client("ecr").describe_repositories method. boto3 documentation

# describe_repositories method definition

def describe_repositories(
    self,
    *,
    registryId: str = ...,
    repositoryNames: Sequence[str] = ...,
    nextToken: str = ...,
    maxResults: int = ...,
) -> DescribeRepositoriesResponseTypeDef:  # (1)
    ...
  1. See DescribeRepositoriesResponseTypeDef
# describe_repositories method usage example with argument unpacking

kwargs: DescribeRepositoriesRequestRequestTypeDef = {  # (1)
    "registryId": ...,
}

parent.describe_repositories(**kwargs)
  1. See DescribeRepositoriesRequestRequestTypeDef

describe_repository_creation_templates#

Returns details about the repository creation templates in a registry.

Type annotations and code completion for boto3.client("ecr").describe_repository_creation_templates method. boto3 documentation

# describe_repository_creation_templates method definition

def describe_repository_creation_templates(
    self,
    *,
    prefixes: Sequence[str] = ...,
    nextToken: str = ...,
    maxResults: int = ...,
) -> DescribeRepositoryCreationTemplatesResponseTypeDef:  # (1)
    ...
  1. See DescribeRepositoryCreationTemplatesResponseTypeDef
# describe_repository_creation_templates method usage example with argument unpacking

kwargs: DescribeRepositoryCreationTemplatesRequestRequestTypeDef = {  # (1)
    "prefixes": ...,
}

parent.describe_repository_creation_templates(**kwargs)
  1. See DescribeRepositoryCreationTemplatesRequestRequestTypeDef

generate_presigned_url#

Generate a presigned url given a client, its method, and arguments.

Type annotations and code completion for boto3.client("ecr").generate_presigned_url method. boto3 documentation

# generate_presigned_url method definition

def generate_presigned_url(
    self,
    ClientMethod: str,
    Params: Mapping[str, Any] = ...,
    ExpiresIn: int = 3600,
    HttpMethod: str = ...,
) -> str:
    ...

get_account_setting#

Retrieves the basic scan type version name.

Type annotations and code completion for boto3.client("ecr").get_account_setting method. boto3 documentation

# get_account_setting method definition

def get_account_setting(
    self,
    *,
    name: str,
) -> GetAccountSettingResponseTypeDef:  # (1)
    ...
  1. See GetAccountSettingResponseTypeDef
# get_account_setting method usage example with argument unpacking

kwargs: GetAccountSettingRequestRequestTypeDef = {  # (1)
    "name": ...,
}

parent.get_account_setting(**kwargs)
  1. See GetAccountSettingRequestRequestTypeDef

get_authorization_token#

Retrieves an authorization token.

Type annotations and code completion for boto3.client("ecr").get_authorization_token method. boto3 documentation

# get_authorization_token method definition

def get_authorization_token(
    self,
    *,
    registryIds: Sequence[str] = ...,
) -> GetAuthorizationTokenResponseTypeDef:  # (1)
    ...
  1. See GetAuthorizationTokenResponseTypeDef
# get_authorization_token method usage example with argument unpacking

kwargs: GetAuthorizationTokenRequestRequestTypeDef = {  # (1)
    "registryIds": ...,
}

parent.get_authorization_token(**kwargs)
  1. See GetAuthorizationTokenRequestRequestTypeDef

get_download_url_for_layer#

Retrieves the pre-signed Amazon S3 download URL corresponding to an image layer.

Type annotations and code completion for boto3.client("ecr").get_download_url_for_layer method. boto3 documentation

# get_download_url_for_layer method definition

def get_download_url_for_layer(
    self,
    *,
    repositoryName: str,
    layerDigest: str,
    registryId: str = ...,
) -> GetDownloadUrlForLayerResponseTypeDef:  # (1)
    ...
  1. See GetDownloadUrlForLayerResponseTypeDef
# get_download_url_for_layer method usage example with argument unpacking

kwargs: GetDownloadUrlForLayerRequestRequestTypeDef = {  # (1)
    "repositoryName": ...,
    "layerDigest": ...,
}

parent.get_download_url_for_layer(**kwargs)
  1. See GetDownloadUrlForLayerRequestRequestTypeDef

get_lifecycle_policy#

Retrieves the lifecycle policy for the specified repository.

Type annotations and code completion for boto3.client("ecr").get_lifecycle_policy method. boto3 documentation

# get_lifecycle_policy method definition

def get_lifecycle_policy(
    self,
    *,
    repositoryName: str,
    registryId: str = ...,
) -> GetLifecyclePolicyResponseTypeDef:  # (1)
    ...
  1. See GetLifecyclePolicyResponseTypeDef
# get_lifecycle_policy method usage example with argument unpacking

kwargs: GetLifecyclePolicyRequestRequestTypeDef = {  # (1)
    "repositoryName": ...,
}

parent.get_lifecycle_policy(**kwargs)
  1. See GetLifecyclePolicyRequestRequestTypeDef

get_lifecycle_policy_preview#

Retrieves the results of the lifecycle policy preview request for the specified repository.

Type annotations and code completion for boto3.client("ecr").get_lifecycle_policy_preview method. boto3 documentation

# get_lifecycle_policy_preview method definition

def get_lifecycle_policy_preview(
    self,
    *,
    repositoryName: str,
    registryId: str = ...,
    imageIds: Sequence[ImageIdentifierTypeDef] = ...,  # (1)
    nextToken: str = ...,
    maxResults: int = ...,
    filter: LifecyclePolicyPreviewFilterTypeDef = ...,  # (2)
) -> GetLifecyclePolicyPreviewResponseTypeDef:  # (3)
    ...
  1. See ImageIdentifierTypeDef
  2. See LifecyclePolicyPreviewFilterTypeDef
  3. See GetLifecyclePolicyPreviewResponseTypeDef
# get_lifecycle_policy_preview method usage example with argument unpacking

kwargs: GetLifecyclePolicyPreviewRequestRequestTypeDef = {  # (1)
    "repositoryName": ...,
}

parent.get_lifecycle_policy_preview(**kwargs)
  1. See GetLifecyclePolicyPreviewRequestRequestTypeDef

get_registry_policy#

Retrieves the permissions policy for a registry.

Type annotations and code completion for boto3.client("ecr").get_registry_policy method. boto3 documentation

# get_registry_policy method definition

def get_registry_policy(
    self,
) -> GetRegistryPolicyResponseTypeDef:  # (1)
    ...
  1. See GetRegistryPolicyResponseTypeDef

get_registry_scanning_configuration#

Retrieves the scanning configuration for a registry.

Type annotations and code completion for boto3.client("ecr").get_registry_scanning_configuration method. boto3 documentation

# get_registry_scanning_configuration method definition

def get_registry_scanning_configuration(
    self,
) -> GetRegistryScanningConfigurationResponseTypeDef:  # (1)
    ...
  1. See GetRegistryScanningConfigurationResponseTypeDef

get_repository_policy#

Retrieves the repository policy for the specified repository.

Type annotations and code completion for boto3.client("ecr").get_repository_policy method. boto3 documentation

# get_repository_policy method definition

def get_repository_policy(
    self,
    *,
    repositoryName: str,
    registryId: str = ...,
) -> GetRepositoryPolicyResponseTypeDef:  # (1)
    ...
  1. See GetRepositoryPolicyResponseTypeDef
# get_repository_policy method usage example with argument unpacking

kwargs: GetRepositoryPolicyRequestRequestTypeDef = {  # (1)
    "repositoryName": ...,
}

parent.get_repository_policy(**kwargs)
  1. See GetRepositoryPolicyRequestRequestTypeDef

initiate_layer_upload#

Notifies Amazon ECR that you intend to upload an image layer.

Type annotations and code completion for boto3.client("ecr").initiate_layer_upload method. boto3 documentation

# initiate_layer_upload method definition

def initiate_layer_upload(
    self,
    *,
    repositoryName: str,
    registryId: str = ...,
) -> InitiateLayerUploadResponseTypeDef:  # (1)
    ...
  1. See InitiateLayerUploadResponseTypeDef
# initiate_layer_upload method usage example with argument unpacking

kwargs: InitiateLayerUploadRequestRequestTypeDef = {  # (1)
    "repositoryName": ...,
}

parent.initiate_layer_upload(**kwargs)
  1. See InitiateLayerUploadRequestRequestTypeDef

list_images#

Lists all the image IDs for the specified repository.

Type annotations and code completion for boto3.client("ecr").list_images method. boto3 documentation

# list_images method definition

def list_images(
    self,
    *,
    repositoryName: str,
    registryId: str = ...,
    nextToken: str = ...,
    maxResults: int = ...,
    filter: ListImagesFilterTypeDef = ...,  # (1)
) -> ListImagesResponseTypeDef:  # (2)
    ...
  1. See ListImagesFilterTypeDef
  2. See ListImagesResponseTypeDef
# list_images method usage example with argument unpacking

kwargs: ListImagesRequestRequestTypeDef = {  # (1)
    "repositoryName": ...,
}

parent.list_images(**kwargs)
  1. See ListImagesRequestRequestTypeDef

list_tags_for_resource#

List the tags for an Amazon ECR resource.

Type annotations and code completion for boto3.client("ecr").list_tags_for_resource method. boto3 documentation

# list_tags_for_resource method definition

def list_tags_for_resource(
    self,
    *,
    resourceArn: str,
) -> ListTagsForResourceResponseTypeDef:  # (1)
    ...
  1. See ListTagsForResourceResponseTypeDef
# list_tags_for_resource method usage example with argument unpacking

kwargs: ListTagsForResourceRequestRequestTypeDef = {  # (1)
    "resourceArn": ...,
}

parent.list_tags_for_resource(**kwargs)
  1. See ListTagsForResourceRequestRequestTypeDef

put_account_setting#

Allows you to change the basic scan type version by setting the name parameter to either CLAIR to AWS_NATIVE.

Type annotations and code completion for boto3.client("ecr").put_account_setting method. boto3 documentation

# put_account_setting method definition

def put_account_setting(
    self,
    *,
    name: str,
    value: str,
) -> PutAccountSettingResponseTypeDef:  # (1)
    ...
  1. See PutAccountSettingResponseTypeDef
# put_account_setting method usage example with argument unpacking

kwargs: PutAccountSettingRequestRequestTypeDef = {  # (1)
    "name": ...,
    "value": ...,
}

parent.put_account_setting(**kwargs)
  1. See PutAccountSettingRequestRequestTypeDef

put_image#

Creates or updates the image manifest and tags associated with an image.

Type annotations and code completion for boto3.client("ecr").put_image method. boto3 documentation

# put_image method definition

def put_image(
    self,
    *,
    repositoryName: str,
    imageManifest: str,
    registryId: str = ...,
    imageManifestMediaType: str = ...,
    imageTag: str = ...,
    imageDigest: str = ...,
) -> PutImageResponseTypeDef:  # (1)
    ...
  1. See PutImageResponseTypeDef
# put_image method usage example with argument unpacking

kwargs: PutImageRequestRequestTypeDef = {  # (1)
    "repositoryName": ...,
    "imageManifest": ...,
}

parent.put_image(**kwargs)
  1. See PutImageRequestRequestTypeDef

put_image_scanning_configuration#

.

Type annotations and code completion for boto3.client("ecr").put_image_scanning_configuration method. boto3 documentation

# put_image_scanning_configuration method definition

def put_image_scanning_configuration(
    self,
    *,
    repositoryName: str,
    imageScanningConfiguration: ImageScanningConfigurationTypeDef,  # (1)
    registryId: str = ...,
) -> PutImageScanningConfigurationResponseTypeDef:  # (2)
    ...
  1. See ImageScanningConfigurationTypeDef
  2. See PutImageScanningConfigurationResponseTypeDef
# put_image_scanning_configuration method usage example with argument unpacking

kwargs: PutImageScanningConfigurationRequestRequestTypeDef = {  # (1)
    "repositoryName": ...,
    "imageScanningConfiguration": ...,
}

parent.put_image_scanning_configuration(**kwargs)
  1. See PutImageScanningConfigurationRequestRequestTypeDef

put_image_tag_mutability#

Updates the image tag mutability settings for the specified repository.

Type annotations and code completion for boto3.client("ecr").put_image_tag_mutability method. boto3 documentation

# put_image_tag_mutability method definition

def put_image_tag_mutability(
    self,
    *,
    repositoryName: str,
    imageTagMutability: ImageTagMutabilityType,  # (1)
    registryId: str = ...,
) -> PutImageTagMutabilityResponseTypeDef:  # (2)
    ...
  1. See ImageTagMutabilityType
  2. See PutImageTagMutabilityResponseTypeDef
# put_image_tag_mutability method usage example with argument unpacking

kwargs: PutImageTagMutabilityRequestRequestTypeDef = {  # (1)
    "repositoryName": ...,
    "imageTagMutability": ...,
}

parent.put_image_tag_mutability(**kwargs)
  1. See PutImageTagMutabilityRequestRequestTypeDef

put_lifecycle_policy#

Creates or updates the lifecycle policy for the specified repository.

Type annotations and code completion for boto3.client("ecr").put_lifecycle_policy method. boto3 documentation

# put_lifecycle_policy method definition

def put_lifecycle_policy(
    self,
    *,
    repositoryName: str,
    lifecyclePolicyText: str,
    registryId: str = ...,
) -> PutLifecyclePolicyResponseTypeDef:  # (1)
    ...
  1. See PutLifecyclePolicyResponseTypeDef
# put_lifecycle_policy method usage example with argument unpacking

kwargs: PutLifecyclePolicyRequestRequestTypeDef = {  # (1)
    "repositoryName": ...,
    "lifecyclePolicyText": ...,
}

parent.put_lifecycle_policy(**kwargs)
  1. See PutLifecyclePolicyRequestRequestTypeDef

put_registry_policy#

Creates or updates the permissions policy for your registry.

Type annotations and code completion for boto3.client("ecr").put_registry_policy method. boto3 documentation

# put_registry_policy method definition

def put_registry_policy(
    self,
    *,
    policyText: str,
) -> PutRegistryPolicyResponseTypeDef:  # (1)
    ...
  1. See PutRegistryPolicyResponseTypeDef
# put_registry_policy method usage example with argument unpacking

kwargs: PutRegistryPolicyRequestRequestTypeDef = {  # (1)
    "policyText": ...,
}

parent.put_registry_policy(**kwargs)
  1. See PutRegistryPolicyRequestRequestTypeDef

put_registry_scanning_configuration#

Creates or updates the scanning configuration for your private registry.

Type annotations and code completion for boto3.client("ecr").put_registry_scanning_configuration method. boto3 documentation

# put_registry_scanning_configuration method definition

def put_registry_scanning_configuration(
    self,
    *,
    scanType: ScanTypeType = ...,  # (1)
    rules: Sequence[RegistryScanningRuleUnionTypeDef] = ...,  # (2)
) -> PutRegistryScanningConfigurationResponseTypeDef:  # (3)
    ...
  1. See ScanTypeType
  2. See RegistryScanningRuleTypeDef RegistryScanningRuleOutputTypeDef
  3. See PutRegistryScanningConfigurationResponseTypeDef
# put_registry_scanning_configuration method usage example with argument unpacking

kwargs: PutRegistryScanningConfigurationRequestRequestTypeDef = {  # (1)
    "scanType": ...,
}

parent.put_registry_scanning_configuration(**kwargs)
  1. See PutRegistryScanningConfigurationRequestRequestTypeDef

put_replication_configuration#

Creates or updates the replication configuration for a registry.

Type annotations and code completion for boto3.client("ecr").put_replication_configuration method. boto3 documentation

# put_replication_configuration method definition

def put_replication_configuration(
    self,
    *,
    replicationConfiguration: ReplicationConfigurationTypeDef,  # (1)
) -> PutReplicationConfigurationResponseTypeDef:  # (2)
    ...
  1. See ReplicationConfigurationTypeDef
  2. See PutReplicationConfigurationResponseTypeDef
# put_replication_configuration method usage example with argument unpacking

kwargs: PutReplicationConfigurationRequestRequestTypeDef = {  # (1)
    "replicationConfiguration": ...,
}

parent.put_replication_configuration(**kwargs)
  1. See PutReplicationConfigurationRequestRequestTypeDef

set_repository_policy#

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

Type annotations and code completion for boto3.client("ecr").set_repository_policy method. boto3 documentation

# set_repository_policy method definition

def set_repository_policy(
    self,
    *,
    repositoryName: str,
    policyText: str,
    registryId: str = ...,
    force: bool = ...,
) -> SetRepositoryPolicyResponseTypeDef:  # (1)
    ...
  1. See SetRepositoryPolicyResponseTypeDef
# set_repository_policy method usage example with argument unpacking

kwargs: SetRepositoryPolicyRequestRequestTypeDef = {  # (1)
    "repositoryName": ...,
    "policyText": ...,
}

parent.set_repository_policy(**kwargs)
  1. See SetRepositoryPolicyRequestRequestTypeDef

start_image_scan#

Starts an image vulnerability scan.

Type annotations and code completion for boto3.client("ecr").start_image_scan method. boto3 documentation

# start_image_scan method definition

def start_image_scan(
    self,
    *,
    repositoryName: str,
    imageId: ImageIdentifierTypeDef,  # (1)
    registryId: str = ...,
) -> StartImageScanResponseTypeDef:  # (2)
    ...
  1. See ImageIdentifierTypeDef
  2. See StartImageScanResponseTypeDef
# start_image_scan method usage example with argument unpacking

kwargs: StartImageScanRequestRequestTypeDef = {  # (1)
    "repositoryName": ...,
    "imageId": ...,
}

parent.start_image_scan(**kwargs)
  1. See StartImageScanRequestRequestTypeDef

start_lifecycle_policy_preview#

Starts a preview of a lifecycle policy for the specified repository.

Type annotations and code completion for boto3.client("ecr").start_lifecycle_policy_preview method. boto3 documentation

# start_lifecycle_policy_preview method definition

def start_lifecycle_policy_preview(
    self,
    *,
    repositoryName: str,
    registryId: str = ...,
    lifecyclePolicyText: str = ...,
) -> StartLifecyclePolicyPreviewResponseTypeDef:  # (1)
    ...
  1. See StartLifecyclePolicyPreviewResponseTypeDef
# start_lifecycle_policy_preview method usage example with argument unpacking

kwargs: StartLifecyclePolicyPreviewRequestRequestTypeDef = {  # (1)
    "repositoryName": ...,
}

parent.start_lifecycle_policy_preview(**kwargs)
  1. See StartLifecyclePolicyPreviewRequestRequestTypeDef

tag_resource#

Adds specified tags to a resource with the specified ARN.

Type annotations and code completion for boto3.client("ecr").tag_resource method. boto3 documentation

# tag_resource method definition

def tag_resource(
    self,
    *,
    resourceArn: str,
    tags: Sequence[TagTypeDef],  # (1)
) -> Dict[str, Any]:
    ...
  1. See TagTypeDef
# tag_resource method usage example with argument unpacking

kwargs: TagResourceRequestRequestTypeDef = {  # (1)
    "resourceArn": ...,
    "tags": ...,
}

parent.tag_resource(**kwargs)
  1. See TagResourceRequestRequestTypeDef

untag_resource#

Deletes specified tags from a resource.

Type annotations and code completion for boto3.client("ecr").untag_resource method. boto3 documentation

# untag_resource method definition

def untag_resource(
    self,
    *,
    resourceArn: str,
    tagKeys: Sequence[str],
) -> Dict[str, Any]:
    ...
# untag_resource method usage example with argument unpacking

kwargs: UntagResourceRequestRequestTypeDef = {  # (1)
    "resourceArn": ...,
    "tagKeys": ...,
}

parent.untag_resource(**kwargs)
  1. See UntagResourceRequestRequestTypeDef

update_pull_through_cache_rule#

Updates an existing pull through cache rule.

Type annotations and code completion for boto3.client("ecr").update_pull_through_cache_rule method. boto3 documentation

# update_pull_through_cache_rule method definition

def update_pull_through_cache_rule(
    self,
    *,
    ecrRepositoryPrefix: str,
    credentialArn: str,
    registryId: str = ...,
) -> UpdatePullThroughCacheRuleResponseTypeDef:  # (1)
    ...
  1. See UpdatePullThroughCacheRuleResponseTypeDef
# update_pull_through_cache_rule method usage example with argument unpacking

kwargs: UpdatePullThroughCacheRuleRequestRequestTypeDef = {  # (1)
    "ecrRepositoryPrefix": ...,
    "credentialArn": ...,
}

parent.update_pull_through_cache_rule(**kwargs)
  1. See UpdatePullThroughCacheRuleRequestRequestTypeDef

update_repository_creation_template#

Updates an existing repository creation template.

Type annotations and code completion for boto3.client("ecr").update_repository_creation_template method. boto3 documentation

# update_repository_creation_template method definition

def update_repository_creation_template(
    self,
    *,
    prefix: str,
    description: str = ...,
    encryptionConfiguration: EncryptionConfigurationForRepositoryCreationTemplateTypeDef = ...,  # (1)
    resourceTags: Sequence[TagTypeDef] = ...,  # (2)
    imageTagMutability: ImageTagMutabilityType = ...,  # (3)
    repositoryPolicy: str = ...,
    lifecyclePolicy: str = ...,
    appliedFor: Sequence[RCTAppliedForType] = ...,  # (4)
    customRoleArn: str = ...,
) -> UpdateRepositoryCreationTemplateResponseTypeDef:  # (5)
    ...
  1. See EncryptionConfigurationForRepositoryCreationTemplateTypeDef
  2. See TagTypeDef
  3. See ImageTagMutabilityType
  4. See RCTAppliedForType
  5. See UpdateRepositoryCreationTemplateResponseTypeDef
# update_repository_creation_template method usage example with argument unpacking

kwargs: UpdateRepositoryCreationTemplateRequestRequestTypeDef = {  # (1)
    "prefix": ...,
}

parent.update_repository_creation_template(**kwargs)
  1. See UpdateRepositoryCreationTemplateRequestRequestTypeDef

upload_layer_part#

Uploads an image layer part to Amazon ECR.

Type annotations and code completion for boto3.client("ecr").upload_layer_part method. boto3 documentation

# upload_layer_part method definition

def upload_layer_part(
    self,
    *,
    repositoryName: str,
    uploadId: str,
    partFirstByte: int,
    partLastByte: int,
    layerPartBlob: BlobTypeDef,
    registryId: str = ...,
) -> UploadLayerPartResponseTypeDef:  # (1)
    ...
  1. See UploadLayerPartResponseTypeDef
# upload_layer_part method usage example with argument unpacking

kwargs: UploadLayerPartRequestRequestTypeDef = {  # (1)
    "repositoryName": ...,
    "uploadId": ...,
    "partFirstByte": ...,
    "partLastByte": ...,
    "layerPartBlob": ...,
}

parent.upload_layer_part(**kwargs)
  1. See UploadLayerPartRequestRequestTypeDef

validate_pull_through_cache_rule#

Validates an existing pull through cache rule for an upstream registry that requires authentication.

Type annotations and code completion for boto3.client("ecr").validate_pull_through_cache_rule method. boto3 documentation

# validate_pull_through_cache_rule method definition

def validate_pull_through_cache_rule(
    self,
    *,
    ecrRepositoryPrefix: str,
    registryId: str = ...,
) -> ValidatePullThroughCacheRuleResponseTypeDef:  # (1)
    ...
  1. See ValidatePullThroughCacheRuleResponseTypeDef
# validate_pull_through_cache_rule method usage example with argument unpacking

kwargs: ValidatePullThroughCacheRuleRequestRequestTypeDef = {  # (1)
    "ecrRepositoryPrefix": ...,
}

parent.validate_pull_through_cache_rule(**kwargs)
  1. See ValidatePullThroughCacheRuleRequestRequestTypeDef

get_paginator#

Type annotations and code completion for boto3.client("ecr").get_paginator method with overloads.

get_waiter#

Type annotations and code completion for boto3.client("ecr").get_waiter method with overloads.