cloudflare/endpoints/load_balancing/
pool_details.rs

1use surf::http::Method;
2
3use crate::endpoints::load_balancing::Pool;
4use crate::framework::endpoint::Endpoint;
5
6/// Pool Details
7/// https://api.cloudflare.com/#account-load-balancer-pools-pool-details
8#[derive(Debug)]
9pub struct PoolDetails<'a> {
10    /// The Cloudflare account of this pool.
11    pub account_identifier: &'a str,
12    /// Which pool to retrieve the details of.
13    pub identifier: &'a str,
14}
15
16impl<'a> Endpoint<Pool, (), ()> for PoolDetails<'a> {
17    fn method(&self) -> Method {
18        Method::Get
19    }
20    fn path(&self) -> String {
21        format!(
22            "accounts/{}/load_balancers/pools/{}",
23            self.account_identifier, self.identifier
24        )
25    }
26}