'How to get domain-name from restApiId using Boto3 API Gateway?

How do I get domain-name from restApiId using Boto3 API Gateway?

For example, supposed I have the following url:

https://abc123.execute-api.us-east-1.amazonaws.com

So abc123 is my restApiId and its domain name could be something like novobiAI. How do I get the domain name attached to this id using Boto3 (gateway version 1)?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source