container_images
Creates, updates, deletes, gets or lists a container_images resource.
Overview
| Name | container_images |
| Type | Resource |
| Id | aws.lightsail.container_images |
Fields
The following fields are returned by SELECT queries:
- get_container_images
| Name | Datatype | Description |
|---|---|---|
container_images | array | An array of objects that describe container images that are registered to the container service. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_container_images | select | region | Returns the container images that are registered to your Amazon Lightsail container service. If you created a deployment on your Lightsail container service that uses container images from a public registry like Docker Hub, those images are not returned as part of this action. Those images are not registered to your Lightsail container service. | |
register_container_image | insert | region, serviceName, label, digest | 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. | |
delete_container_image | delete | region | Deletes a container image that is registered to your Amazon Lightsail container service. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_container_images
Returns the container images that are registered to your Amazon Lightsail container service. If you created a deployment on your Lightsail container service that uses container images from a public registry like Docker Hub, those images are not returned as part of this action. Those images are not registered to your Lightsail container service.
SELECT
container_images
FROM aws.lightsail.container_images
WHERE region = '{{ region }}' -- required
;
INSERT examples
- register_container_image
- Manifest
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.
INSERT INTO aws.lightsail.container_images (
serviceName,
label,
digest,
region
)
SELECT
'{{ serviceName }}' /* required */,
'{{ label }}' /* required */,
'{{ digest }}' /* required */,
'{{ region }}'
RETURNING
container_image
;
# Description fields are for documentation purposes
- name: container_images
props:
- name: region
value: "{{ region }}"
description: Required parameter for the container_images resource.
- name: serviceName
value: "{{ serviceName }}"
description: |
The name of the container service for which to register a container image.
- name: label
value: "{{ label }}"
description: |
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.
- name: digest
value: "{{ digest }}"
description: |
The digest of the container image to be registered.
DELETE examples
- delete_container_image
Deletes a container image that is registered to your Amazon Lightsail container service.
DELETE FROM aws.lightsail.container_images
WHERE region = '{{ region }}' --required
;