你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

SecurityCenterExtensions.GetSecurityAssessmentAsync 方法

定义

获取已扫描资源的安全评估

  • 请求路径/{resourceId}/providers/Microsoft.Security/assessments/{assessmentName}
  • 操作IdAssessments_Get
public static System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.SecurityCenter.SecurityAssessmentResource>> GetSecurityAssessmentAsync (this Azure.ResourceManager.ArmClient client, Azure.Core.ResourceIdentifier scope, string assessmentName, Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentODataExpand? expand = default, System.Threading.CancellationToken cancellationToken = default);
static member GetSecurityAssessmentAsync : Azure.ResourceManager.ArmClient * Azure.Core.ResourceIdentifier * string * Nullable<Azure.ResourceManager.SecurityCenter.Models.SecurityAssessmentODataExpand> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.ResourceManager.SecurityCenter.SecurityAssessmentResource>>
<Extension()>
Public Function GetSecurityAssessmentAsync (client As ArmClient, scope As ResourceIdentifier, assessmentName As String, Optional expand As Nullable(Of SecurityAssessmentODataExpand) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of SecurityAssessmentResource))

参数

client
ArmClient

方法 ArmClient 将对其执行的实例。

scope
ResourceIdentifier

资源将应用于的范围。

assessmentName
String

评估密钥 - 评估类型的唯一键。

expand
Nullable<SecurityAssessmentODataExpand>

OData 展开。 可选。

cancellationToken
CancellationToken

要使用的取消标记。

返回

例外

assessmentName 是一个空字符串,预期为非空。

assessmentName 为 null。

适用于