Skip to main content

containers

Creates, updates, deletes or gets a container resource or lists containers in a region

Overview

Namecontainers
TypeResource
DescriptionResource Type definition for AWS::Lightsail::Container
Idaws.lightsail.containers

Fields

NameDatatypeDescription
service_namestringThe name for the container service.
powerstringThe power specification for the container service.
container_arnstring
scaleintegerThe scale specification for the container service.
public_domain_namesarrayThe public domain names to use with the container service, such as example.com and www.example.com.
container_service_deploymentobjectDescribes a container deployment configuration of an Amazon Lightsail container service.
is_disabledbooleanA Boolean value to indicate whether the container service is disabled.
private_registry_accessobjectA Boolean value to indicate whether the container service has access to private container image repositories, such as Amazon Elastic Container Registry (Amazon ECR) private repositories.
urlstringThe publicly accessible URL of the container service.
principal_arnstringThe principal ARN of the container service.
tagsarrayAn array of key-value pairs to apply to this resource.
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTServiceName, Power, Scale, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__Identifier, region

SELECT examples

Gets all containers in a region.

SELECT
region,
service_name,
power,
container_arn,
scale,
public_domain_names,
container_service_deployment,
is_disabled,
private_registry_access,
url,
principal_arn,
tags
FROM aws.lightsail.containers
WHERE region = 'us-east-1';

Gets all properties from an individual container.

SELECT
region,
service_name,
power,
container_arn,
scale,
public_domain_names,
container_service_deployment,
is_disabled,
private_registry_access,
url,
principal_arn,
tags
FROM aws.lightsail.containers
WHERE region = 'us-east-1' AND data__Identifier = '<ServiceName>';

INSERT example

Use the following StackQL query and manifest file to create a new container resource, using stack-deploy.

/*+ create */
INSERT INTO aws.lightsail.containers (
ServiceName,
Power,
Scale,
region
)
SELECT
'{{ ServiceName }}',
'{{ Power }}',
'{{ Scale }}',
'{{ region }}';

DELETE example

/*+ delete */
DELETE FROM aws.lightsail.containers
WHERE data__Identifier = '<ServiceName>'
AND region = 'us-east-1';

Permissions

To operate on the containers resource, the following permissions are required:

Create

lightsail:CreateContainerService,
lightsail:CreateContainerServiceDeployment,
lightsail:GetContainerServices,
lightsail:TagResource,
lightsail:UntagResource,
lightsail:UpdateContainerService

Read

lightsail:GetContainerServices

Delete

lightsail:DeleteContainerService,
lightsail:GetContainerServices

List

lightsail:GetContainerServices

Update

lightsail:CreateContainerServiceDeployment,
lightsail:GetContainerServices,
lightsail:TagResource,
lightsail:UntagResource,
lightsail:UpdateContainerService