containers
Creates, updates, deletes or gets a container
resource or lists containers
in a region
Overview
Name | containers |
Type | Resource |
Description | Resource Type definition for AWS::Lightsail::Container |
Id | aws.lightsail.containers |
Fields
Name | Datatype | Description |
---|---|---|
service_name | string | The name for the container service. |
power | string | The power specification for the container service. |
container_arn | string | |
scale | integer | The scale specification for the container service. |
public_domain_names | array | The public domain names to use with the container service, such as example.com and www.example.com. |
container_service_deployment | object | Describes a container deployment configuration of an Amazon Lightsail container service. |
is_disabled | boolean | A Boolean value to indicate whether the container service is disabled. |
private_registry_access | object | A 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. |
url | string | The publicly accessible URL of the container service. |
principal_arn | string | The principal ARN of the container service. |
tags | array | An array of key-value pairs to apply to this resource. |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | ServiceName, Power, Scale, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__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
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.lightsail.containers (
ServiceName,
Power,
Scale,
region
)
SELECT
'{{ ServiceName }}',
'{{ Power }}',
'{{ Scale }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.lightsail.containers (
ServiceName,
Power,
Scale,
PublicDomainNames,
ContainerServiceDeployment,
IsDisabled,
PrivateRegistryAccess,
Tags,
region
)
SELECT
'{{ ServiceName }}',
'{{ Power }}',
'{{ Scale }}',
'{{ PublicDomainNames }}',
'{{ ContainerServiceDeployment }}',
'{{ IsDisabled }}',
'{{ PrivateRegistryAccess }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: container
props:
- name: ServiceName
value: '{{ ServiceName }}'
- name: Power
value: '{{ Power }}'
- name: Scale
value: '{{ Scale }}'
- name: PublicDomainNames
value:
- CertificateName: '{{ CertificateName }}'
DomainNames:
- '{{ DomainNames[0] }}'
- name: ContainerServiceDeployment
value:
Containers:
- ServiceName: '{{ ServiceName }}'
Power: '{{ Power }}'
Scale: '{{ Scale }}'
PublicDomainNames:
- null
ContainerServiceDeployment: null
IsDisabled: '{{ IsDisabled }}'
PrivateRegistryAccess:
EcrImagePullerRole:
IsActive: '{{ IsActive }}'
PrincipalArn: '{{ PrincipalArn }}'
Tags:
- Key: '{{ Key }}'
Value: '{{ Value }}'
PublicEndpoint:
ContainerName: '{{ ContainerName }}'
ContainerPort: '{{ ContainerPort }}'
HealthCheckConfig:
HealthyThreshold: '{{ HealthyThreshold }}'
IntervalSeconds: '{{ IntervalSeconds }}'
Path: '{{ Path }}'
SuccessCodes: '{{ SuccessCodes }}'
TimeoutSeconds: '{{ TimeoutSeconds }}'
UnhealthyThreshold: '{{ UnhealthyThreshold }}'
- name: IsDisabled
value: '{{ IsDisabled }}'
- name: PrivateRegistryAccess
value: null
- name: Tags
value:
- null
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