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
Idawscc.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.

For more information, see AWS::Lightsail::Container.

Methods

NameResourceAccessible byRequired Params
create_resourcecontainersINSERTServiceName, Power, Scale, region
delete_resourcecontainersDELETEIdentifier, region
update_resourcecontainersUPDATEIdentifier, PatchDocument, region
list_resourcescontainers_list_onlySELECTregion
get_resourcecontainersSELECTIdentifier, region

SELECT examples

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 awscc.lightsail.containers
WHERE
region = 'us-east-1' AND
Identifier = '{{ service_name }}';

INSERT example

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

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

UPDATE example

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

/*+ update */
UPDATE awscc.lightsail.containers
SET PatchDocument = string('{{ {
"Power": power,
"Scale": scale,
"PublicDomainNames": public_domain_names,
"ContainerServiceDeployment": container_service_deployment,
"IsDisabled": is_disabled,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ service_name }}';

DELETE example

/*+ delete */
DELETE FROM awscc.lightsail.containers
WHERE
Identifier = '{{ service_name }}' AND
region = 'us-east-1';

Permissions

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

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