CmdID / aws / aws lightsail
aws lightsail get-domains
Returns a list of all domains in the user's account. AWS CLI reference
1 example 1 option Its page in the AWS CLI reference
Examples
To get information about all domains
The following get-domains example displays details about all of the domains in the configured AWS Region.
Note: Lightsail's domain-related API operations are available in only the us-east-1 AWS Region. If your CLI profile is configured to use a different Region, you must include the --region us-east-1 parameter or the command fails.
aws lightsail get-domains --region us-east-1Identify--regionThe region to use.Its output, shortened
{
"domains": [
{
"name": "example.com",
"arn": "arn:aws:lightsail:global:123456789012:Domain/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111",
"supportCode": "6EXAMPLE3362//hostedzone/ZEXAMPLEONGSC1",
"createdAt": 1570728588.6,
"location": {
"availabilityZone": "all",
"regionName": "global"
},
"resourceType": "Domain",
"tags": [],
"domainEntries": [
{
"id": "-1682899164",
"name": "example.com",
"target": "192.0.2.0",
"isAlias": false,
"type": "A"
},
{
"id": "1703104243",
"name": "example.com",
"target": "ns-137.awsdns-17.com",
"isAlias": false,
"type": "NS"
},
{
"id": "-1038331153",
… 163 more linesFor more information, see Understanding DNS in Lightsail in the Amazon Lightsail User Guide.
Options
--page-tokenThe token to advance to the next page of results from your request.