pub struct SpaAPI { /* private fields */ }
Expand description
SPA (Spark Pod Autosizing) API. Provides resource recommendations and cost insights to help optimize Spark job configurations.
Implementations§
Source§impl SpaAPI
impl SpaAPI
pub fn new() -> Self
Sourcepub fn with_config(config: Configuration) -> Self
pub fn with_config(config: Configuration) -> Self
Examples found in repository?
examples/v2_spa_GetSPARecommendations.rs (line 9)
6async fn main() {
7 let mut configuration = datadog::Configuration::new();
8 configuration.set_unstable_operation_enabled("v2.GetSPARecommendations", true);
9 let api = SpaAPI::with_config(configuration);
10 let resp = api
11 .get_spa_recommendations("shard".to_string(), "service".to_string())
12 .await;
13 if let Ok(value) = resp {
14 println!("{:#?}", value);
15 } else {
16 println!("{:#?}", resp.unwrap_err());
17 }
18}
pub fn with_client_and_config( config: Configuration, client: ClientWithMiddleware, ) -> Self
Sourcepub async fn get_spa_recommendations(
&self,
shard: String,
service: String,
) -> Result<RecommendationDocument, Error<GetSPARecommendationsError>>
pub async fn get_spa_recommendations( &self, shard: String, service: String, ) -> Result<RecommendationDocument, Error<GetSPARecommendationsError>>
Retrieve resource recommendations for a Spark job. The caller (Spark Gateway or DJM UI) provides a service name and shard identifier, and SPA returns structured recommendations for driver and executor resources.
Examples found in repository?
examples/v2_spa_GetSPARecommendations.rs (line 11)
6async fn main() {
7 let mut configuration = datadog::Configuration::new();
8 configuration.set_unstable_operation_enabled("v2.GetSPARecommendations", true);
9 let api = SpaAPI::with_config(configuration);
10 let resp = api
11 .get_spa_recommendations("shard".to_string(), "service".to_string())
12 .await;
13 if let Ok(value) = resp {
14 println!("{:#?}", value);
15 } else {
16 println!("{:#?}", resp.unwrap_err());
17 }
18}
Sourcepub async fn get_spa_recommendations_with_http_info(
&self,
shard: String,
service: String,
) -> Result<ResponseContent<RecommendationDocument>, Error<GetSPARecommendationsError>>
pub async fn get_spa_recommendations_with_http_info( &self, shard: String, service: String, ) -> Result<ResponseContent<RecommendationDocument>, Error<GetSPARecommendationsError>>
Retrieve resource recommendations for a Spark job. The caller (Spark Gateway or DJM UI) provides a service name and shard identifier, and SPA returns structured recommendations for driver and executor resources.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SpaAPI
impl !RefUnwindSafe for SpaAPI
impl Send for SpaAPI
impl Sync for SpaAPI
impl Unpin for SpaAPI
impl !UnwindSafe for SpaAPI
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more