:doc:`Lightsail <../../lightsail>` / Client / register_container_image

************************
register_container_image
************************



.. py:method:: Lightsail.Client.register_container_image(**kwargs)

  

  Registers a container image to your Amazon Lightsail container service.

   

  .. note::

    

    This action is not required if you install and use the Lightsail Control (lightsailctl) plugin to push container images to your Lightsail container service. For more information, see `Pushing and managing container images on your Amazon Lightsail container services <https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-pushing-container-images>`__ in the *Amazon Lightsail Developer Guide*.

    

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/lightsail-2016-11-28/RegisterContainerImage>`_  


  **Request Syntax**
  ::

    response = client.register_container_image(
        serviceName='string',
        label='string',
        digest='string'
    )
    
  :type serviceName: string
  :param serviceName: **[REQUIRED]** 

    The name of the container service for which to register a container image.

    

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

    The label for the container image when it's registered to the container service.

     

    Use a descriptive label that you can use to track the different versions of your registered container images.

     

    Use the ``GetContainerImages`` action to return the container images registered to a Lightsail container service. The label is the ``<imagelabel>`` portion of the following image name example:

     

    
    * ``:container-service-1.<imagelabel>.1``
    

     

    If the name of your container service is ``mycontainerservice``, and the label that you specify is ``mystaticwebsite``, then the name of the registered container image will be ``:mycontainerservice.mystaticwebsite.1``.

     

    The number at the end of these image name examples represents the version of the registered container image. If you push and register another container image to the same Lightsail container service, with the same label, then the version number for the new registered container image will be ``2``. If you push and register another container image, the version number will be ``3``, and so on.

    

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

    The digest of the container image to be registered.

    

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

    
    ::

      {
          'containerImage': {
              'image': 'string',
              'digest': 'string',
              'createdAt': datetime(2015, 1, 1)
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **containerImage** *(dict) --* 

        An object that describes a container image that is registered to a Lightsail container service

        
        

        - **image** *(string) --* 

          The name of the container image.

          
        

        - **digest** *(string) --* 

          The digest of the container image.

          
        

        - **createdAt** *(datetime) --* 

          The timestamp when the container image was created.

          
    
  
  **Exceptions**
  
  *   :py:class:`Lightsail.Client.exceptions.ServiceException`

  
  *   :py:class:`Lightsail.Client.exceptions.InvalidInputException`

  
  *   :py:class:`Lightsail.Client.exceptions.NotFoundException`

  
  *   :py:class:`Lightsail.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`Lightsail.Client.exceptions.UnauthenticatedException`

  
  *   :py:class:`Lightsail.Client.exceptions.RegionSetupInProgressException`

  