domains
Creates, updates, deletes or gets a domain resource or lists domains in a region
Overview
| Name | domains |
| Type | Resource |
| Description | Resource Type definition for AWS::Lightsail::Domain |
| Id | awscc.lightsail.domains |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
domain_name | string | The name of the domain to manage in Lightsail. |
domain_entries | array | An array of key-value pairs containing information about the domain entries. |
arn | string | The Amazon Resource Name (ARN) of the domain (read-only). |
support_code | string | The support code. Include this code in your email to support when you have questions (read-only). |
created_at | string | The timestamp when the domain was created (read-only). |
location | object | The AWS Region and Availability Zone where the domain was created (read-only). |
resource_type | string | The Lightsail resource type (read-only). |
tags | array | An array of key-value pairs to apply to this resource. |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
domain_name | string | The name of the domain to manage in Lightsail. |
region | string | AWS region. |
For more information, see AWS::Lightsail::Domain.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | domains | INSERT | DomainName, region |
delete_resource | domains | DELETE | Identifier, region |
update_resource | domains | UPDATE | Identifier, PatchDocument, region |
list_resources | domains_list_only | SELECT | region |
get_resource | domains | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual domain.
SELECT
region,
domain_name,
domain_entries,
arn,
support_code,
created_at,
location,
resource_type,
tags
FROM awscc.lightsail.domains
WHERE
region = 'us-east-1' AND
Identifier = '{{ domain_name }}';
Lists all domains in a region.
SELECT
region,
domain_name
FROM awscc.lightsail.domains_list_only
WHERE
region = 'us-east-1';
INSERT example
Use the following StackQL query and manifest file to create a new domain resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.lightsail.domains (
DomainName,
region
)
SELECT
'{{ domain_name }}',
'{{ region }}';
/*+ create */
INSERT INTO awscc.lightsail.domains (
DomainName,
DomainEntries,
Tags,
region
)
SELECT
'{{ domain_name }}',
'{{ domain_entries }}',
'{{ tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: domain
props:
- name: domain_name
value: '{{ domain_name }}'
- name: domain_entries
value:
- id: '{{ id }}'
name: '{{ name }}'
target: '{{ target }}'
is_alias: '{{ is_alias }}'
type: '{{ type }}'
- name: tags
value:
- key: '{{ key }}'
value: '{{ value }}'
UPDATE example
Use the following StackQL query and manifest file to update a domain resource, using stack-deploy.
/*+ update */
UPDATE awscc.lightsail.domains
SET PatchDocument = string('{{ {
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ domain_name }}';
DELETE example
/*+ delete */
DELETE FROM awscc.lightsail.domains
WHERE
Identifier = '{{ domain_name }}' AND
region = 'us-east-1';
Permissions
To operate on the domains resource, the following permissions are required:
- Create
- Read
- Update
- Delete
- List
lightsail:CreateDomain,
lightsail:GetDomain,
lightsail:CreateDomainEntry,
lightsail:TagResource
lightsail:GetDomain
lightsail:GetDomain,
lightsail:CreateDomainEntry,
lightsail:DeleteDomainEntry,
lightsail:TagResource,
lightsail:UntagResource
lightsail:DeleteDomain,
lightsail:GetDomain
lightsail:GetDomains