Lightsail / Client / register_container_image
register_container_image#
- 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 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 ismystaticwebsite
, 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 be3
, 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