pub struct SecurityClient<'a> { /* private fields */ }Expand description
Client for the Azure Defender for Cloud ARM management plane.
Wraps SecurityOps with ergonomic signatures that auto-inject
subscription_id from the parent AzureHttpClient.
Implementations§
Source§impl<'a> SecurityClient<'a>
impl<'a> SecurityClient<'a>
Sourcepub async fn list_alerts(&self) -> Result<AlertListResult>
pub async fn list_alerts(&self) -> Result<AlertListResult>
Lists all alerts associated with the subscription.
Sourcepub async fn get_alert(
&self,
resource_group_name: &str,
asc_location: &str,
alert_name: &str,
) -> Result<Alert>
pub async fn get_alert( &self, resource_group_name: &str, asc_location: &str, alert_name: &str, ) -> Result<Alert>
Gets an alert within a resource group.
asc_location is the ASC location (e.g. "eastus").
Use az security location list to discover the location for your tenant.
Sourcepub async fn update_alert_status(
&self,
resource_group_name: &str,
asc_location: &str,
alert_name: &str,
alert_update_action_type: &str,
) -> Result<()>
pub async fn update_alert_status( &self, resource_group_name: &str, asc_location: &str, alert_name: &str, alert_update_action_type: &str, ) -> Result<()>
Updates the status of an alert.
alert_update_action_type is one of: activate, dismiss, resolve,
inProgress, close.
Sourcepub async fn list_secure_scores(&self) -> Result<SecureScoreListResult>
pub async fn list_secure_scores(&self) -> Result<SecureScoreListResult>
Lists all secure scores for the subscription.
Sourcepub async fn get_secure_score(
&self,
secure_score_name: &str,
) -> Result<SecureScore>
pub async fn get_secure_score( &self, secure_score_name: &str, ) -> Result<SecureScore>
Gets the secure score for a specific Defender for Cloud initiative.
Use "ascScore" for the built-in Microsoft Defender for Cloud score.
Sourcepub async fn list_assessments(&self) -> Result<AssessmentListResult>
pub async fn list_assessments(&self) -> Result<AssessmentListResult>
Lists all security assessments for the subscription.
Sourcepub async fn get_assessment(&self, assessment_name: &str) -> Result<Assessment>
pub async fn get_assessment(&self, assessment_name: &str) -> Result<Assessment>
Gets a specific security assessment.
assessment_name is the UUID of the assessment definition
(e.g. "4fb67663-9ab9-475d-b026-8c544cced439" for OS vulnerabilities).
NOTE: This endpoint requires api-version=2021-06-01 on the live API,
while the service manifest uses 2020-01-01 (required by secureScores).
As a result this will return 405 against the live API. Use the unit test
mock to verify the URL and deserialization logic.