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
MUTABLEis specified, image tags can be overwritten. IfIMMUTABLEis specified, all image tags within the repository will be immutable which will prevent them from being overwritten.imageTagMutabilityExclusionFilters (list) –
Creates or updates a repository with filters that define which image tags can override the default image tag mutability setting.
(dict) –
Overrides the default image tag mutability setting of the repository for image tags that match the specified filters.
filterType (string) – [REQUIRED]
Specifies the type of filter to use for excluding image tags from the repository’s mutability setting.
filter (string) – [REQUIRED]
The value to use when filtering image tags. Must be either a regular expression pattern or a tag prefix value based on the specified filter type.
- 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) –
Returns a list of filters that were defined for a repository. These filters determine which image tags can override the default image tag mutability setting of the repository.
(dict) –
Overrides the default image tag mutability setting of the repository for image tags that match the specified filters.
filterType (string) –
Specifies the type of filter to use for excluding image tags from the repository’s mutability setting.
filter (string) –
The value to use when filtering image tags. Must be either a regular expression pattern or a tag prefix value based on the specified filter type.
Exceptions
ECR.Client.exceptions.ServerExceptionECR.Client.exceptions.InvalidParameterExceptionECR.Client.exceptions.RepositoryNotFoundException