(&self)
| 351 | } |
| 352 | |
| 353 | pub async fn is_mcp_enabled(&self) -> Result<bool, ApiClientError> { |
| 354 | let request = self |
| 355 | .client |
| 356 | .get_profile() |
| 357 | .set_profile_arn(self.profile.as_ref().map(|p| p.arn.clone())); |
| 358 | |
| 359 | let response = request.send().await?; |
| 360 | let mcp_enabled = response |
| 361 | .profile() |
| 362 | .opt_in_features() |
| 363 | .and_then(|features| features.mcp_configuration()) |
| 364 | .is_none_or(|config| matches!(config.toggle(), OptInFeatureToggle::On)); |
| 365 | Ok(mcp_enabled) |
| 366 | } |
| 367 | |
| 368 | pub async fn create_subscription_token(&self) -> Result<CreateSubscriptionTokenOutput, ApiClientError> { |
| 369 | if cfg!(test) { |
no test coverage detected