Skip to main content

check_hetzner_availability

Function check_hetzner_availability 

Source
pub async fn check_hetzner_availability(
    client: &PlatformApiClient,
    project_id: &str,
    location: &str,
    server_type: &str,
) -> (bool, Option<String>, Vec<String>)
Expand description

Check availability of a specific server type at a location

Returns (available, reason, alternative_locations):

  • available: true if the server type can be provisioned now
  • reason: None if available, Some(“capacity”|“unsupported”) if not
  • alternative_locations: Other locations where this server type IS available

The agent uses this for pre-deployment validation and smart fallback.