ECR / Client / put_image_tag_mutability

put_image_tag_mutability

ECR.Client.put_image_tag_mutability(**kwargs)

Updates the image tag mutability settings for the specified repository. For more information, see Image tag mutability in the Amazon Elastic Container Registry User Guide.

See also: AWS API Documentation

Request Syntax

response = client.put_image_tag_mutability(
    registryId='string',
    repositoryName='string',
    imageTagMutability='MUTABLE'|'IMMUTABLE'|'IMMUTABLE_WITH_EXCLUSION'|'MUTABLE_WITH_EXCLUSION',
    imageTagMutabilityExclusionFilters=[
        {
            'filterType': 'WILDCARD',
            'filter': 'string'
        },
    ]
)
Parameters:
  • registryId (string) – The Amazon Web Services account ID associated with the registry that contains the repository in which to update the image tag mutability settings. If you do not specify a registry, the default registry is assumed.

  • repositoryName (string) –

    [REQUIRED]

    The name of the repository in which to update the image tag mutability settings.

  • imageTagMutability (string) –

    [REQUIRED]

    The tag mutability setting for the repository. If MUTABLE is specified, image tags can be overwritten. If IMMUTABLE is specified, all image tags within the repository will be immutable which will prevent them from being overwritten.

  • imageTagMutabilityExclusionFilters (list) –

    A list of filters that specify which image tags should be excluded from the image tag mutability setting being applied.

    • (dict) –

      A filter that specifies which image tags should be excluded from the repository’s image tag mutability setting.

      • filterType (string) – [REQUIRED]

        The type of filter to apply for excluding image tags from mutability settings.

      • filter (string) – [REQUIRED]

        The filter value used to match image tags for exclusion from mutability settings.

Return type:

dict

Returns:

Response Syntax

{
    'registryId': 'string',
    'repositoryName': 'string',
    'imageTagMutability': 'MUTABLE'|'IMMUTABLE'|'IMMUTABLE_WITH_EXCLUSION'|'MUTABLE_WITH_EXCLUSION',
    'imageTagMutabilityExclusionFilters': [
        {
            'filterType': 'WILDCARD',
            'filter': 'string'
        },
    ]
}

Response Structure

  • (dict) –

    • registryId (string) –

      The registry ID associated with the request.

    • repositoryName (string) –

      The repository name associated with the request.

    • imageTagMutability (string) –

      The image tag mutability setting for the repository.

    • imageTagMutabilityExclusionFilters (list) –

      The list of filters that specify which image tags are excluded from the repository’s image tag mutability setting.

      • (dict) –

        A filter that specifies which image tags should be excluded from the repository’s image tag mutability setting.

        • filterType (string) –

          The type of filter to apply for excluding image tags from mutability settings.

        • filter (string) –

          The filter value used to match image tags for exclusion from mutability settings.

Exceptions

  • ECR.Client.exceptions.ServerException

  • ECR.Client.exceptions.InvalidParameterException

  • ECR.Client.exceptions.RepositoryNotFoundException