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

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.

Usage example
client = boto3.client("ecr")

try:
    do_something(client)
except (
    client.ClientError,
    client.EmptyUploadException,
    client.ImageAlreadyExistsException,
    client.ImageDigestDoesNotMatchException,
    client.ImageNotFoundException,
    client.ImageTagAlreadyExistsException,
    client.InvalidLayerException,
    client.InvalidLayerPartException,
    client.InvalidParameterException,
    client.InvalidTagParameterException,
    client.KmsException,
    client.LayerAlreadyExistsException,
    client.LayerInaccessibleException,
    client.LayerPartTooSmallException,
    client.LayersNotFoundException,
    client.LifecyclePolicyNotFoundException,
    client.LifecyclePolicyPreviewInProgressException,
    client.LifecyclePolicyPreviewNotFoundException,
    client.LimitExceededException,
    client.PullThroughCacheRuleAlreadyExistsException,
    client.PullThroughCacheRuleNotFoundException,
    client.ReferencedImagesNotFoundException,
    client.RegistryPolicyNotFoundException,
    client.RepositoryAlreadyExistsException,
    client.RepositoryNotEmptyException,
    client.RepositoryNotFoundException,
    client.RepositoryPolicyNotFoundException,
    client.ScanNotFoundException,
    client.ServerException,
    client.TooManyTagsException,
    client.UnsupportedImageTypeException,
    client.UnsupportedUpstreamRegistryException,
    client.UploadNotFoundException,
    client.ValidationException,
) as e:
    print(e)
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

Method definition
def batch_check_layer_availability(
    self,
    *,
    repositoryName: str,
    layerDigests: Sequence[str],
    registryId: str = ...,
) -> BatchCheckLayerAvailabilityResponseTypeDef:  # (1)
    ...
  1. See BatchCheckLayerAvailabilityResponseTypeDef
Usage example with kwargs
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

Method definition
def batch_delete_image(
    self,
    *,
    repositoryName: str,
    imageIds: Sequence[ImageIdentifierTypeDef],  # (1)
    registryId: str = ...,
) -> BatchDeleteImageResponseTypeDef:  # (2)
    ...
  1. See ImageIdentifierTypeDef
  2. See BatchDeleteImageResponseTypeDef
Usage example with kwargs
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

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
Usage example with kwargs
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

Method definition
def batch_get_repository_scanning_configuration(
    self,
    *,
    repositoryNames: Sequence[str],
) -> BatchGetRepositoryScanningConfigurationResponseTypeDef:  # (1)
    ...
  1. See BatchGetRepositoryScanningConfigurationResponseTypeDef
Usage example with kwargs
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

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

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

Method definition
def complete_layer_upload(
    self,
    *,
    repositoryName: str,
    uploadId: str,
    layerDigests: Sequence[str],
    registryId: str = ...,
) -> CompleteLayerUploadResponseTypeDef:  # (1)
    ...
  1. See CompleteLayerUploadResponseTypeDef
Usage example with kwargs
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

Method definition
def create_pull_through_cache_rule(
    self,
    *,
    ecrRepositoryPrefix: str,
    upstreamRegistryUrl: str,
    registryId: str = ...,
) -> CreatePullThroughCacheRuleResponseTypeDef:  # (1)
    ...
  1. See CreatePullThroughCacheRuleResponseTypeDef
Usage example with kwargs
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

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
Usage example with kwargs
kwargs: CreateRepositoryRequestRequestTypeDef = {  # (1)
    "repositoryName": ...,
}

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

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

Method definition
def delete_lifecycle_policy(
    self,
    *,
    repositoryName: str,
    registryId: str = ...,
) -> DeleteLifecyclePolicyResponseTypeDef:  # (1)
    ...
  1. See DeleteLifecyclePolicyResponseTypeDef
Usage example with kwargs
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

Method definition
def delete_pull_through_cache_rule(
    self,
    *,
    ecrRepositoryPrefix: str,
    registryId: str = ...,
) -> DeletePullThroughCacheRuleResponseTypeDef:  # (1)
    ...
  1. See DeletePullThroughCacheRuleResponseTypeDef
Usage example with kwargs
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

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

Method definition
def delete_repository(
    self,
    *,
    repositoryName: str,
    registryId: str = ...,
    force: bool = ...,
) -> DeleteRepositoryResponseTypeDef:  # (1)
    ...
  1. See DeleteRepositoryResponseTypeDef
Usage example with kwargs
kwargs: DeleteRepositoryRequestRequestTypeDef = {  # (1)
    "repositoryName": ...,
}

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

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

Method definition
def delete_repository_policy(
    self,
    *,
    repositoryName: str,
    registryId: str = ...,
) -> DeleteRepositoryPolicyResponseTypeDef:  # (1)
    ...
  1. See DeleteRepositoryPolicyResponseTypeDef
Usage example with kwargs
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

Method definition
def describe_image_replication_status(
    self,
    *,
    repositoryName: str,
    imageId: ImageIdentifierTypeDef,  # (1)
    registryId: str = ...,
) -> DescribeImageReplicationStatusResponseTypeDef:  # (2)
    ...
  1. See ImageIdentifierTypeDef
  2. See DescribeImageReplicationStatusResponseTypeDef
Usage example with kwargs
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

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
Usage example with kwargs
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

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
Usage example with kwargs
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

Method definition
def describe_pull_through_cache_rules(
    self,
    *,
    registryId: str = ...,
    ecrRepositoryPrefixes: Sequence[str] = ...,
    nextToken: str = ...,
    maxResults: int = ...,
) -> DescribePullThroughCacheRulesResponseTypeDef:  # (1)
    ...
  1. See DescribePullThroughCacheRulesResponseTypeDef
Usage example with kwargs
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

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

Method definition
def describe_repositories(
    self,
    *,
    registryId: str = ...,
    repositoryNames: Sequence[str] = ...,
    nextToken: str = ...,
    maxResults: int = ...,
) -> DescribeRepositoriesResponseTypeDef:  # (1)
    ...
  1. See DescribeRepositoriesResponseTypeDef
Usage example with kwargs
kwargs: DescribeRepositoriesRequestRequestTypeDef = {  # (1)
    "registryId": ...,
}

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

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

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

get_authorization_token

Retrieves an authorization token.

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

Method definition
def get_authorization_token(
    self,
    *,
    registryIds: Sequence[str] = ...,
) -> GetAuthorizationTokenResponseTypeDef:  # (1)
    ...
  1. See GetAuthorizationTokenResponseTypeDef
Usage example with kwargs
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

Method definition
def get_download_url_for_layer(
    self,
    *,
    repositoryName: str,
    layerDigest: str,
    registryId: str = ...,
) -> GetDownloadUrlForLayerResponseTypeDef:  # (1)
    ...
  1. See GetDownloadUrlForLayerResponseTypeDef
Usage example with kwargs
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

Method definition
def get_lifecycle_policy(
    self,
    *,
    repositoryName: str,
    registryId: str = ...,
) -> GetLifecyclePolicyResponseTypeDef:  # (1)
    ...
  1. See GetLifecyclePolicyResponseTypeDef
Usage example with kwargs
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

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
Usage example with kwargs
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

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

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

Method definition
def get_repository_policy(
    self,
    *,
    repositoryName: str,
    registryId: str = ...,
) -> GetRepositoryPolicyResponseTypeDef:  # (1)
    ...
  1. See GetRepositoryPolicyResponseTypeDef
Usage example with kwargs
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

Method definition
def initiate_layer_upload(
    self,
    *,
    repositoryName: str,
    registryId: str = ...,
) -> InitiateLayerUploadResponseTypeDef:  # (1)
    ...
  1. See InitiateLayerUploadResponseTypeDef
Usage example with kwargs
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

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
Usage example with kwargs
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

Method definition
def list_tags_for_resource(
    self,
    *,
    resourceArn: str,
) -> ListTagsForResourceResponseTypeDef:  # (1)
    ...
  1. See ListTagsForResourceResponseTypeDef
Usage example with kwargs
kwargs: ListTagsForResourceRequestRequestTypeDef = {  # (1)
    "resourceArn": ...,
}

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

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

Method definition
def put_image(
    self,
    *,
    repositoryName: str,
    imageManifest: str,
    registryId: str = ...,
    imageManifestMediaType: str = ...,
    imageTag: str = ...,
    imageDigest: str = ...,
) -> PutImageResponseTypeDef:  # (1)
    ...
  1. See PutImageResponseTypeDef
Usage example with kwargs
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

Method definition
def put_image_scanning_configuration(
    self,
    *,
    repositoryName: str,
    imageScanningConfiguration: ImageScanningConfigurationTypeDef,  # (1)
    registryId: str = ...,
) -> PutImageScanningConfigurationResponseTypeDef:  # (2)
    ...
  1. See ImageScanningConfigurationTypeDef
  2. See PutImageScanningConfigurationResponseTypeDef
Usage example with kwargs
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

Method definition
def put_image_tag_mutability(
    self,
    *,
    repositoryName: str,
    imageTagMutability: ImageTagMutabilityType,  # (1)
    registryId: str = ...,
) -> PutImageTagMutabilityResponseTypeDef:  # (2)
    ...
  1. See ImageTagMutabilityType
  2. See PutImageTagMutabilityResponseTypeDef
Usage example with kwargs
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

Method definition
def put_lifecycle_policy(
    self,
    *,
    repositoryName: str,
    lifecyclePolicyText: str,
    registryId: str = ...,
) -> PutLifecyclePolicyResponseTypeDef:  # (1)
    ...
  1. See PutLifecyclePolicyResponseTypeDef
Usage example with kwargs
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

Method definition
def put_registry_policy(
    self,
    *,
    policyText: str,
) -> PutRegistryPolicyResponseTypeDef:  # (1)
    ...
  1. See PutRegistryPolicyResponseTypeDef
Usage example with kwargs
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

Method definition
def put_registry_scanning_configuration(
    self,
    *,
    scanType: ScanTypeType = ...,  # (1)
    rules: Sequence[RegistryScanningRuleTypeDef] = ...,  # (2)
) -> PutRegistryScanningConfigurationResponseTypeDef:  # (3)
    ...
  1. See ScanTypeType
  2. See RegistryScanningRuleTypeDef
  3. See PutRegistryScanningConfigurationResponseTypeDef
Usage example with kwargs
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

Method definition
def put_replication_configuration(
    self,
    *,
    replicationConfiguration: ReplicationConfigurationTypeDef,  # (1)
) -> PutReplicationConfigurationResponseTypeDef:  # (2)
    ...
  1. See ReplicationConfigurationTypeDef
  2. See PutReplicationConfigurationResponseTypeDef
Usage example with kwargs
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

Method definition
def set_repository_policy(
    self,
    *,
    repositoryName: str,
    policyText: str,
    registryId: str = ...,
    force: bool = ...,
) -> SetRepositoryPolicyResponseTypeDef:  # (1)
    ...
  1. See SetRepositoryPolicyResponseTypeDef
Usage example with kwargs
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

Method definition
def start_image_scan(
    self,
    *,
    repositoryName: str,
    imageId: ImageIdentifierTypeDef,  # (1)
    registryId: str = ...,
) -> StartImageScanResponseTypeDef:  # (2)
    ...
  1. See ImageIdentifierTypeDef
  2. See StartImageScanResponseTypeDef
Usage example with kwargs
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

Method definition
def start_lifecycle_policy_preview(
    self,
    *,
    repositoryName: str,
    registryId: str = ...,
    lifecyclePolicyText: str = ...,
) -> StartLifecyclePolicyPreviewResponseTypeDef:  # (1)
    ...
  1. See StartLifecyclePolicyPreviewResponseTypeDef
Usage example with kwargs
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

Method definition
def tag_resource(
    self,
    *,
    resourceArn: str,
    tags: Sequence[TagTypeDef],  # (1)
) -> Dict[str, Any]:
    ...
  1. See TagTypeDef
Usage example with kwargs
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

Method definition
def untag_resource(
    self,
    *,
    resourceArn: str,
    tagKeys: Sequence[str],
) -> Dict[str, Any]:
    ...
Usage example with kwargs
kwargs: UntagResourceRequestRequestTypeDef = {  # (1)
    "resourceArn": ...,
    "tagKeys": ...,
}

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

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

Method definition
def upload_layer_part(
    self,
    *,
    repositoryName: str,
    uploadId: str,
    partFirstByte: int,
    partLastByte: int,
    layerPartBlob: Union[str, bytes, IO[Any], StreamingBody],
    registryId: str = ...,
) -> UploadLayerPartResponseTypeDef:  # (1)
    ...
  1. See UploadLayerPartResponseTypeDef
Usage example with kwargs
kwargs: UploadLayerPartRequestRequestTypeDef = {  # (1)
    "repositoryName": ...,
    "uploadId": ...,
    "partFirstByte": ...,
    "partLastByte": ...,
    "layerPartBlob": ...,
}

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

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.