:doc:`ECR <../../ecr>` / Client / update_image_storage_class

**************************
update_image_storage_class
**************************



.. py:method:: ECR.Client.update_image_storage_class(**kwargs)

  

  Transitions an image between storage classes. You can transition images from Amazon ECR standard storage class to Amazon ECR archival storage class for long-term storage, or restore archived images back to Amazon ECR standard.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/ecr-2015-09-21/UpdateImageStorageClass>`_  


  **Request Syntax**
  ::

    response = client.update_image_storage_class(
        registryId='string',
        repositoryName='string',
        imageId={
            'imageDigest': 'string',
            'imageTag': 'string'
        },
        targetStorageClass='STANDARD'|'ARCHIVE'
    )
    
  :type registryId: string
  :param registryId: 

    The Amazon Web Services account ID associated with the registry that contains the image to transition. If you do not specify a registry, the default registry is assumed.

    

  
  :type repositoryName: string
  :param repositoryName: **[REQUIRED]** 

    The name of the repository that contains the image to transition.

    

  
  :type imageId: dict
  :param imageId: **[REQUIRED]** 

    An object with identifying information for an image in an Amazon ECR repository.

    

  
    - **imageDigest** *(string) --* 

      The ``sha256`` digest of the image manifest.

      

    
    - **imageTag** *(string) --* 

      The tag used for the image.

      

    
  
  :type targetStorageClass: string
  :param targetStorageClass: **[REQUIRED]** 

    The target storage class for the image.

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'registryId': 'string',
          'repositoryName': 'string',
          'imageId': {
              'imageDigest': 'string',
              'imageTag': 'string'
          },
          'imageStatus': 'ACTIVE'|'ARCHIVED'|'ACTIVATING'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **registryId** *(string) --* 

        The registry ID associated with the request.

        
      

      - **repositoryName** *(string) --* 

        The repository name associated with the request.

        
      

      - **imageId** *(dict) --* 

        An object with identifying information for an image in an Amazon ECR repository.

        
        

        - **imageDigest** *(string) --* 

          The ``sha256`` digest of the image manifest.

          
        

        - **imageTag** *(string) --* 

          The tag used for the image.

          
    
      

      - **imageStatus** *(string) --* 

        The current status of the image after the call to UpdateImageStorageClass is complete. Valid values are ``ACTIVE``, ``ARCHIVED``, and ``ACTIVATING``.

        
  
  **Exceptions**
  
  *   :py:class:`ECR.Client.exceptions.InvalidParameterException`

  
  *   :py:class:`ECR.Client.exceptions.ImageNotFoundException`

  
  *   :py:class:`ECR.Client.exceptions.ImageStorageClassUpdateNotSupportedException`

  
  *   :py:class:`ECR.Client.exceptions.RepositoryNotFoundException`

  
  *   :py:class:`ECR.Client.exceptions.ServerException`

  
  *   :py:class:`ECR.Client.exceptions.ValidationException`

  