Table Of Contents

Feedback

User Guide

First time using the AWS CLI? See the User Guide for help getting started.

Note: You are viewing the documentation for an older major version of the AWS CLI (version 1).

AWS CLI version 2, the latest major version of AWS CLI, is now stable and recommended for general use. To view this page for the AWS CLI version 2, click here. For more information see the AWS CLI version 2 installation instructions and migration guide.

[ aws . lightsail ]

get-domain

Description

Returns information about a specific domain recordset.

See also: AWS API Documentation

See 'aws help' for descriptions of global parameters.

Synopsis

  get-domain
--domain-name <value>
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]

Options

--domain-name (string)

The domain name for which your want to return information about.

--cli-input-json (string) Performs service operation based on the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, the CLI values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

See 'aws help' for descriptions of global parameters.

Examples

To get information about a domain

The following get-domain example displays details about the domain example.com.

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-domain \
    --domain-name example.com \
    --region us-east-1

Output:

{
    "domain": {
        "name": "example.com",
        "arn": "arn:aws:lightsail:global:111122223333:Domain/28cda903-3f15-44b2-9baf-3EXAMPLEb304",
        "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",
                "name": "example.com",
                "target": "ns-1710.awsdns-21.co.uk",
                "isAlias": false,
                "type": "NS"
            },
            {
                "id": "-2107289565",
                "name": "example.com",
                "target": "ns-692.awsdns-22.net",
                "isAlias": false,
                "type": "NS"
            },
            {
                "id": "1582095705",
                "name": "example.com",
                "target": "ns-1436.awsdns-51.org",
                "isAlias": false,
                "type": "NS"
            },
            {
                "id": "-1769796132",
                "name": "example.com",
                "target": "ns-1710.awsdns-21.co.uk. awsdns-hostmaster.amazon.com. 1 7200 900 1209600 86400",
                "isAlias": false,
                "type": "SOA"
            }
        ]
    }
}

Output

domain -> (structure)

An array of key-value pairs containing information about your get domain request.

name -> (string)

The name of the domain.

arn -> (string)

The Amazon Resource Name (ARN) of the domain recordset (e.g., arn:aws:lightsail:global:123456789101:Domain/824cede0-abc7-4f84-8dbc-12345EXAMPLE ).

supportCode -> (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.

createdAt -> (timestamp)

The date when the domain recordset was created.

location -> (structure)

The AWS Region and Availability Zones where the domain recordset was created.

availabilityZone -> (string)

The Availability Zone. Follows the format us-east-2a (case-sensitive).

regionName -> (string)

The AWS Region name.

resourceType -> (string)

The resource type.

tags -> (list)

The tag keys and optional values for the resource. For more information about tags in Lightsail, see the Lightsail Dev Guide .

(structure)

Describes a tag key and optional value assigned to an Amazon Lightsail resource.

For more information about tags in Lightsail, see the Lightsail Dev Guide .

key -> (string)

The key of the tag.

Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @

value -> (string)

The value of the tag.

Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @

domainEntries -> (list)

An array of key-value pairs containing information about the domain entries.

(structure)

Describes a domain recordset entry.

id -> (string)

The ID of the domain recordset entry.

name -> (string)

The name of the domain.

target -> (string)

The target AWS name server (e.g., ns-111.awsdns-22.com. ).

For Lightsail load balancers, the value looks like ab1234c56789c6b86aba6fb203d443bc-123456789.us-east-2.elb.amazonaws.com . Be sure to also set isAlias to true when setting up an A record for a load balancer.

isAlias -> (boolean)

When true , specifies whether the domain entry is an alias used by the Lightsail load balancer. You can include an alias (A type) record in your request, which points to a load balancer DNS name and routes traffic to your load balancer

type -> (string)

The type of domain entry, such as address (A), canonical name (CNAME), mail exchanger (MX), name server (NS), start of authority (SOA), service locator (SRV), or text (TXT).

The following domain entry types can be used:

  • A
  • CNAME
  • MX
  • NS
  • SOA
  • SRV
  • TXT

options -> (map)

(Deprecated) The options for the domain entry.

Note

In releases prior to November 29, 2017, this parameter was not included in the API response. It is now deprecated.

key -> (string)

value -> (string)