register_container_image
¶
register_container_image(
service_name: ContainerServiceName,
label: ContainerLabel,
digest: string,
*,
config_overrides: Optional[LightsailClientConfig] = None,
) -> RegisterContainerImageResult
Registers a container image to your Amazon Lightsail container service.
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.
Parameters:
-
service_name(ContainerServiceName) –The name of the container service for which to register a container image.
-
label(ContainerLabel) –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
GetContainerImagesaction to return the container images registered to a Lightsail container service. The label is theportion of the following image name example:-
:container-service-1..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) –The digest of the container image to be registered.
Raises:
-
AccessDeniedException–Lightsail throws this exception when the user cannot be authenticated or uses invalid credentials to access a resource.
-
InvalidInputException–Lightsail throws this exception when user input does not conform to the validation rules of an input field.
Domain and distribution APIs are only available in the N. Virginia (
us-east-1) Amazon Web Services Region. Please set your Amazon Web Services Region configuration tous-east-1to create, view, or edit these resources. -
NotFoundException–Lightsail throws this exception when it cannot find a resource.
-
RegionSetupInProgressException–Lightsail throws this exception when an operation is performed on resources in an opt-in Region that is currently being set up.
-
ServiceException–A general service exception.
-
UnauthenticatedException–Lightsail throws this exception when the user has not been authenticated.
-
UnknownServiceError–The service returned an error code this client does not model.