Lightsail / Client / get_domains
get_domains#
- Lightsail.Client.get_domains(**kwargs)#
Returns a list of all domains in the user’s account.
See also: AWS API Documentation
Request Syntax
response = client.get_domains( pageToken='string' )
- Parameters:
pageToken (string) –
The token to advance to the next page of results from your request.
To get a page token, perform an initial
GetDomains
request. If your results are paginated, the response will return a next page token that you can specify as the page token in a subsequent request.- Return type:
dict
- Returns:
Response Syntax
{ 'domains': [ { 'name': 'string', 'arn': 'string', 'supportCode': 'string', 'createdAt': datetime(2015, 1, 1), 'location': { 'availabilityZone': 'string', 'regionName': 'us-east-1'|'us-east-2'|'us-west-1'|'us-west-2'|'eu-west-1'|'eu-west-2'|'eu-west-3'|'eu-central-1'|'ca-central-1'|'ap-south-1'|'ap-southeast-1'|'ap-southeast-2'|'ap-northeast-1'|'ap-northeast-2'|'eu-north-1' }, 'resourceType': 'ContainerService'|'Instance'|'StaticIp'|'KeyPair'|'InstanceSnapshot'|'Domain'|'PeeredVpc'|'LoadBalancer'|'LoadBalancerTlsCertificate'|'Disk'|'DiskSnapshot'|'RelationalDatabase'|'RelationalDatabaseSnapshot'|'ExportSnapshotRecord'|'CloudFormationStackRecord'|'Alarm'|'ContactMethod'|'Distribution'|'Certificate'|'Bucket', 'tags': [ { 'key': 'string', 'value': 'string' }, ], 'domainEntries': [ { 'id': 'string', 'name': 'string', 'target': 'string', 'isAlias': True|False, 'type': 'string', 'options': { 'string': 'string' } }, ], 'registeredDomainDelegationInfo': { 'nameServersUpdateState': { 'code': 'SUCCEEDED'|'PENDING'|'FAILED'|'STARTED', 'message': 'string' }, 'r53HostedZoneDeletionState': { 'code': 'SUCCEEDED'|'PENDING'|'FAILED'|'STARTED', 'message': 'string' } } }, ], 'nextPageToken': 'string' }
Response Structure
(dict) –
domains (list) –
An array of key-value pairs containing information about each of the domain entries in the user’s account.
(dict) –
Describes a domain where you are storing recordsets.
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 (datetime) –
The date when the domain recordset was created.
location (dict) –
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 Amazon Web Services 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 Amazon Lightsail Developer Guide.
(dict) –
Describes a tag key and optional value assigned to an Amazon Lightsail resource.
For more information about tags in Lightsail, see the Amazon Lightsail Developer 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.
(dict) –
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 IP address (e.g.,
192.0.2.0
), or 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
. For Lightsail distributions, the value looks likeexampled1182ne.cloudfront.net
. For Lightsail container services, the value looks likecontainer-service-1.example23scljs.us-west-2.cs.amazonlightsail.com
. Be sure to also setisAlias
totrue
when setting up an A record for a Lightsail load balancer, distribution, or container service.isAlias (boolean) –
When
true
, specifies whether the domain entry is an alias used by the Lightsail load balancer, Lightsail container service, Lightsail content delivery network (CDN) distribution, or another Amazon Web Services resource. You can include an alias (A type) record in your request, which points to the DNS name of a load balancer, container service, CDN distribution, or other Amazon Web Services resource and routes traffic to that resource.type (string) –
The type of domain entry, such as address for IPv4 (A), address for IPv6 (AAAA), 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
AAAA
CNAME
MX
NS
SOA
SRV
TXT
options (dict) –
(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.
(string) –
(string) –
registeredDomainDelegationInfo (dict) –
An object that describes the state of the Route 53 domain delegation to a Lightsail DNS zone.
nameServersUpdateState (dict) –
An object that describes the state of the name server records that are automatically added to the Route 53 domain by Lightsail.
code (string) –
The status code for the name servers update.
Following are the possible values:
SUCCEEDED
- The name server records were successfully updated.PENDING
- The name server record update is in progress.FAILED
- The name server record update failed.STARTED
- The automatic name server record update started.
message (string) –
The message that describes the reason for the status code.
r53HostedZoneDeletionState (dict) –
Describes the deletion state of an Amazon Route 53 hosted zone for a domain that is being automatically delegated to an Amazon Lightsail DNS zone.
code (string) –
The status code for the deletion state.
Following are the possible values:
SUCCEEDED
- The hosted zone was successfully deleted.PENDING
- The hosted zone deletion is in progress.FAILED
- The hosted zone deletion failed.STARTED
- The hosted zone deletion started.
message (string) –
The message that describes the reason for the status code.
nextPageToken (string) –
The token to advance to the next page of results from your request.
A next page token is not returned if there are no more results to display.
To get the next page of results, perform another
GetDomains
request and specify the next page token using thepageToken
parameter.
Exceptions
Lightsail.Client.exceptions.ServiceException
Lightsail.Client.exceptions.InvalidInputException
Lightsail.Client.exceptions.NotFoundException
Lightsail.Client.exceptions.OperationFailureException
Lightsail.Client.exceptions.AccessDeniedException
Lightsail.Client.exceptions.AccountSetupInProgressException
Lightsail.Client.exceptions.UnauthenticatedException