code: def rest_api_exists(self, rest_api_id):
          # type: (str) -> bool
          
          client = self._client('apigateway')
          try:
              client.get_rest_api(restApiId=rest_api_id)
              return True
          except client.exceptions.NotFoundException:
              return False
docs: Check if an an API Gateway REST API exists.