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'
)
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.
{
'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
An array of key-value pairs containing information about each of the domain entries in the user's account.
Describes a domain where you are storing recordsets.
The name of the domain.
The Amazon Resource Name (ARN) of the domain recordset (e.g., arn:aws:lightsail:global:123456789101:Domain/824cede0-abc7-4f84-8dbc-12345EXAMPLE
).
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.
The date when the domain recordset was created.
The AWS Region and Availability Zones where the domain recordset was created.
The Availability Zone. Follows the format us-east-2a
(case-sensitive).
The Amazon Web Services Region name.
The resource type.
The tag keys and optional values for the resource. For more information about tags in Lightsail, see the Amazon Lightsail Developer Guide.
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.
The key of the tag.
Constraints: Tag keys accept a maximum of 128 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
The value of the tag.
Constraints: Tag values accept a maximum of 256 letters, numbers, spaces in UTF-8, or the following characters: + - = . _ : / @
An array of key-value pairs containing information about the domain entries.
Describes a domain recordset entry.
The ID of the domain recordset entry.
The name of the domain.
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 like exampled1182ne.cloudfront.net
. For Lightsail container services, the value looks like container-service-1.example23scljs.us-west-2.cs.amazonlightsail.com
. Be sure to also set isAlias
to true
when setting up an A record for a Lightsail load balancer, distribution, or container service.
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.
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
(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.
An object that describes the state of the Route 53 domain delegation to a Lightsail DNS zone.
An object that describes the state of the name server records that are automatically added to the Route 53 domain by Lightsail.
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.The message that describes the reason for the status code.
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.
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.The message that describes the reason for the status code.
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 the pageToken
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