Skip to main content

container_services

Creates, updates, deletes, gets or lists a container_services resource.

Overview

Namecontainer_services
TypeResource
Idaws.lightsail.container_services

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
container_servicesarrayAn array of objects that describe one or more container services.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_container_servicesselectregionReturns information about one or more of your Amazon Lightsail container services.
create_container_serviceinsertregion, serviceName, power, scaleCreates an Amazon Lightsail container service. A Lightsail container service is a compute resource to which you can deploy containers. For more information, see Container services in Amazon Lightsail in the Lightsail Dev Guide.
create_container_service_registry_logininsertregionCreates a temporary set of log in credentials that you can use to log in to the Docker process on your local machine. After you're logged in, you can use the native Docker commands to push your local container images to the container image registry of your Amazon Lightsail account so that you can use them with your Lightsail container service. The log in credentials expire 12 hours after they are created, at which point you will need to create a new set of log in credentials. You can only push container images to the container service registry of your Lightsail account. You cannot pull container images or perform any other container image management actions on the container service registry. After you push your container images to the container image registry of your Lightsail account, use the RegisterContainerImage action to register the pushed images to a specific 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.
update_container_serviceupdateregion, serviceNameUpdates the configuration of your Amazon Lightsail container service, such as its power, scale, and public domain names.
delete_container_servicedeleteregionDeletes 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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Returns information about one or more of your Amazon Lightsail container services.

SELECT
container_services
FROM aws.lightsail.container_services
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates an Amazon Lightsail container service. A Lightsail container service is a compute resource to which you can deploy containers. For more information, see Container services in Amazon Lightsail in the Lightsail Dev Guide.

INSERT INTO aws.lightsail.container_services (
serviceName,
power,
scale,
tags,
publicDomainNames,
deployment,
privateRegistryAccess,
region
)
SELECT
'{{ serviceName }}' /* required */,
'{{ power }}' /* required */,
{{ scale }} /* required */,
'{{ tags }}',
'{{ publicDomainNames }}',
'{{ deployment }}',
'{{ privateRegistryAccess }}',
'{{ region }}'
RETURNING
container_service
;

UPDATE examples

Updates the configuration of your Amazon Lightsail container service, such as its power, scale, and public domain names.

UPDATE aws.lightsail.container_services
SET
serviceName = '{{ serviceName }}',
power = '{{ power }}',
scale = {{ scale }},
isDisabled = {{ isDisabled }},
publicDomainNames = '{{ publicDomainNames }}',
privateRegistryAccess = '{{ privateRegistryAccess }}'
WHERE
region = '{{ region }}' --required
AND serviceName = '{{ serviceName }}' --required
RETURNING
container_service;

DELETE examples

Deletes your Amazon Lightsail container service.

DELETE FROM aws.lightsail.container_services
WHERE region = '{{ region }}' --required
;