register_container_image

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 in the Amazon Lightsail Developer Guide .

See also: AWS API Documentation

Request Syntax

response = client.register_container_image(
    serviceName='string',
    label='string',
    digest='string'
)
Parameters
  • serviceName (string) --

    [REQUIRED]

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

  • label (string) --

    [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.

  • digest (string) --

    [REQUIRED]

    The digest of the container image to be registered.

Return type

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

  • Lightsail.Client.exceptions.ServiceException
  • Lightsail.Client.exceptions.InvalidInputException
  • Lightsail.Client.exceptions.NotFoundException
  • Lightsail.Client.exceptions.AccessDeniedException
  • Lightsail.Client.exceptions.UnauthenticatedException