check_dns_availability

ElasticBeanstalk.Client.check_dns_availability(**kwargs)

Checks if the specified CNAME is available.

See also: AWS API Documentation

Request Syntax

response = client.check_dns_availability(
    CNAMEPrefix='string'
)
Parameters
CNAMEPrefix (string) --

[REQUIRED]

The prefix used when this CNAME is reserved.

Return type
dict
Returns
Response Syntax
{
    'Available': True|False,
    'FullyQualifiedCNAME': 'string'
}

Response Structure

  • (dict) --

    Indicates if the specified CNAME is available.

    • Available (boolean) --

      Indicates if the specified CNAME is available:

      • true : The CNAME is available.
      • false : The CNAME is not available.
    • FullyQualifiedCNAME (string) --

      The fully qualified CNAME to reserve when CreateEnvironment is called with the provided prefix.

Examples

The following operation checks the availability of the subdomain my-cname:

response = client.check_dns_availability(
    CNAMEPrefix='my-cname',
)

print(response)

Expected Output:

{
    'Available': True,
    'FullyQualifiedCNAME': 'my-cname.us-west-2.elasticbeanstalk.com',
    'ResponseMetadata': {
        '...': '...',
    },
}