domains
Creates, updates, deletes, gets or lists a domains resource.
Overview
| Name | domains |
| Type | Resource |
| Id | aws.lightsail.domains |
Fields
The following fields are returned by SELECT queries:
- get_domain
- get_domains
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the domain. (pattern: <code>\w[\w-]*\w</code>) |
arn | string | The Amazon Resource Name (ARN) of the domain recordset (arn:aws:lightsail:global:123456789101:Domain/824cede0-abc7-4f84-8dbc-12345EXAMPLE). (pattern: <code>.\S.</code>) |
created_at | string (date-time) | The date when the domain recordset was created. |
domain_entries | array | An array of key-value pairs containing information about the domain entries. |
location | object | The AWS Region and Availability Zones where the domain recordset was created. |
registered_domain_delegation_info | object | An object that describes the state of the Route 53 domain delegation to a Lightsail DNS zone. |
resource_type | string | The resource type. (ContainerService, Instance, StaticIp, KeyPair, InstanceSnapshot, Domain, PeeredVpc, LoadBalancer, LoadBalancerTlsCertificate, Disk, DiskSnapshot, RelationalDatabase, RelationalDatabaseSnapshot, ExportSnapshotRecord, CloudFormationStackRecord, Alarm, ContactMethod, Distribution, Certificate, Bucket) |
support_code | string | The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily. |
tags | array | The tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide. |
| Name | Datatype | Description |
|---|---|---|
name | string | The name of the domain. (pattern: <code>\w[\w-]*\w</code>) |
arn | string | The Amazon Resource Name (ARN) of the domain recordset (arn:aws:lightsail:global:123456789101:Domain/824cede0-abc7-4f84-8dbc-12345EXAMPLE). (pattern: <code>.\S.</code>) |
created_at | string (date-time) | The date when the domain recordset was created. |
domain_entries | array | An array of key-value pairs containing information about the domain entries. |
location | object | The AWS Region and Availability Zones where the domain recordset was created. |
registered_domain_delegation_info | object | An object that describes the state of the Route 53 domain delegation to a Lightsail DNS zone. |
resource_type | string | The resource type. (ContainerService, Instance, StaticIp, KeyPair, InstanceSnapshot, Domain, PeeredVpc, LoadBalancer, LoadBalancerTlsCertificate, Disk, DiskSnapshot, RelationalDatabase, RelationalDatabaseSnapshot, ExportSnapshotRecord, CloudFormationStackRecord, Alarm, ContactMethod, Distribution, Certificate, Bucket) |
support_code | string | The support code. Include this code in your email to support when you have questions about an instance or another resource in Lightsail. This code enables our support team to look up your Lightsail information more easily. |
tags | array | The tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_domain | select | region | Returns information about a specific domain recordset. | |
get_domains | select | region | Returns a list of all domains in the user's account. | |
create_domain_entry | insert | region, domainName, domainEntry | Creates one of the following domain name system (DNS) records in a domain DNS zone: Address (A), canonical name (CNAME), mail exchanger (MX), name server (NS), start of authority (SOA), service locator (SRV), or text (TXT). The create domain entry operation supports tag-based access control via resource tags applied to the resource identified by domain name. For more information, see the Amazon Lightsail Developer Guide. | |
create_domain | insert | region, domainName | Creates a domain resource for the specified domain (example.com). The create domain operation supports tag-based access control via request tags. For more information, see the Amazon Lightsail Developer Guide. | |
update_domain_entry | update | region, domainName, domainEntry | Updates a domain recordset after it is created. The update domain entry operation supports tag-based access control via resource tags applied to the resource identified by domain name. For more information, see the Amazon Lightsail Developer Guide. | |
delete_domain_entry | delete | region | Deletes a specific domain entry. The delete domain entry operation supports tag-based access control via resource tags applied to the resource identified by domain name. For more information, see the Amazon Lightsail Developer Guide. | |
delete_domain | delete | region | Deletes the specified domain recordset and all of its domain records. The delete domain operation supports tag-based access control via resource tags applied to the resource identified by domain name. For more information, see the Amazon Lightsail Developer Guide. |
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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_domain
- get_domains
Returns information about a specific domain recordset.
SELECT
name,
arn,
created_at,
domain_entries,
location,
registered_domain_delegation_info,
resource_type,
support_code,
tags
FROM aws.lightsail.domains
WHERE region = '{{ region }}' -- required
;
Returns a list of all domains in the user's account.
SELECT
name,
arn,
created_at,
domain_entries,
location,
registered_domain_delegation_info,
resource_type,
support_code,
tags
FROM aws.lightsail.domains
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_domain_entry
- create_domain
- Manifest
Creates one of the following domain name system (DNS) records in a domain DNS zone: Address (A), canonical name (CNAME), mail exchanger (MX), name server (NS), start of authority (SOA), service locator (SRV), or text (TXT). The create domain entry operation supports tag-based access control via resource tags applied to the resource identified by domain name. For more information, see the Amazon Lightsail Developer Guide.
INSERT INTO aws.lightsail.domains (
domainName,
domainEntry,
region
)
SELECT
'{{ domainName }}' /* required */,
'{{ domainEntry }}' /* required */,
'{{ region }}'
RETURNING
operation
;
Creates a domain resource for the specified domain (example.com). The create domain operation supports tag-based access control via request tags. For more information, see the Amazon Lightsail Developer Guide.
INSERT INTO aws.lightsail.domains (
domainName,
tags,
region
)
SELECT
'{{ domainName }}' /* required */,
'{{ tags }}',
'{{ region }}'
RETURNING
operation
;
# Description fields are for documentation purposes
- name: domains
props:
- name: region
value: "{{ region }}"
description: Required parameter for the domains resource.
- name: domainName
value: "{{ domainName }}"
description: |
The domain name to manage (example.com).
- name: domainEntry
description: |
An array of key-value pairs containing information about the domain entry request.
value:
id: "{{ id }}"
name: "{{ name }}"
target: "{{ target }}"
isAlias: {{ isAlias }}
type_: "{{ type_ }}"
options: "{{ options }}"
- name: tags
description: |
The tag keys and optional values to add to the resource during create. Use the TagResource action to tag a resource after it's created.
value:
- key: "{{ key }}"
value: "{{ value }}"
UPDATE examples
- update_domain_entry
Updates a domain recordset after it is created. The update domain entry operation supports tag-based access control via resource tags applied to the resource identified by domain name. For more information, see the Amazon Lightsail Developer Guide.
UPDATE aws.lightsail.domains
SET
domainName = '{{ domainName }}',
domainEntry = '{{ domainEntry }}'
WHERE
region = '{{ region }}' --required
AND domainName = '{{ domainName }}' --required
AND domainEntry = '{{ domainEntry }}' --required
RETURNING
operations;
DELETE examples
- delete_domain_entry
- delete_domain
Deletes a specific domain entry. The delete domain entry operation supports tag-based access control via resource tags applied to the resource identified by domain name. For more information, see the Amazon Lightsail Developer Guide.
DELETE FROM aws.lightsail.domains
WHERE region = '{{ region }}' --required
;
Deletes the specified domain recordset and all of its domain records. The delete domain operation supports tag-based access control via resource tags applied to the resource identified by domain name. For more information, see the Amazon Lightsail Developer Guide.
DELETE FROM aws.lightsail.domains
WHERE region = '{{ region }}' --required
;