SqlServerSqlVulnerabilityAssessmentScanResultCollection.GetIfExistsAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Tries to get details for this resource from the service.
- Request Path. : /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/sqlVulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/scanResults/{scanResultId}.
- Operation Id. : SqlVulnerabilityAssessmentScanResult_Get.
- Default Api Version. : 2025-08-01-preview.
public virtual System.Threading.Tasks.Task<Azure.NullableResponse<Azure.ResourceManager.Sql.SqlServerSqlVulnerabilityAssessmentScanResultResource>> GetIfExistsAsync(string scanResultId, Azure.ResourceManager.Sql.Models.VulnerabilityAssessmentSystemDatabaseName systemDatabaseName, System.Threading.CancellationToken cancellationToken = default);
abstract member GetIfExistsAsync : string * Azure.ResourceManager.Sql.Models.VulnerabilityAssessmentSystemDatabaseName * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.NullableResponse<Azure.ResourceManager.Sql.SqlServerSqlVulnerabilityAssessmentScanResultResource>>
override this.GetIfExistsAsync : string * Azure.ResourceManager.Sql.Models.VulnerabilityAssessmentSystemDatabaseName * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.NullableResponse<Azure.ResourceManager.Sql.SqlServerSqlVulnerabilityAssessmentScanResultResource>>
Public Overridable Function GetIfExistsAsync (scanResultId As String, systemDatabaseName As VulnerabilityAssessmentSystemDatabaseName, Optional cancellationToken As CancellationToken = Nothing) As Task(Of NullableResponse(Of SqlServerSqlVulnerabilityAssessmentScanResultResource))
Parameters
- scanResultId
- String
The scan result id of the specific result to retrieve.
- systemDatabaseName
- VulnerabilityAssessmentSystemDatabaseName
The SQL vulnerability assessment system database name.
- cancellationToken
- CancellationToken
The cancellation token to use.
Returns
Exceptions
scanResultId is null.
scanResultId is an empty string, and was expected to be non-empty.