Managed Database Vulnerability Assessment Scans - Initiate Scan

Executes a Vulnerability Assessment database scan.

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/default/scans/{scanId}/initiateScan?api-version=2021-11-01

URI Parameters

Name In Required Type Description
databaseName
path True

string

The name of the database.

managedInstanceName
path True

string

The name of the managed instance.

resourceGroupName
path True

string

The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.

scanId
path True

string

The vulnerability assessment scan Id of the scan to retrieve.

subscriptionId
path True

string

The subscription ID that identifies an Azure subscription.

vulnerabilityAssessmentName
path True

VulnerabilityAssessmentName

The name of the vulnerability assessment.

api-version
query True

string

The API version to use for the request.

Responses

Name Type Description
200 OK

Successfully executed a Vulnerability Assessment database scan.

202 Accepted

Successfully started a Vulnerability Assessment database scan.

Other Status Codes

*** Error Responses: ***

  • 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.

  • 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.

  • 400 InvalidVulnerabilityAssessmentScanIdLength - The vulnerability assessment scan ID length must be below {0} characters.

  • 400 InvalidStorageAccountName - The provided storage account is not valid or does not exist.

  • 400 InvalidStorageAccountCredentials - The provided storage account shared access signature or account storage key is not valid.

  • 400 VulnerabilityAssessmentInvalidPolicy - Vulnerability Assessment settings don't exist or invalid storage specified in settings.

  • 400 VulnerabilityAssessmentADSIsDisabled - Advanced Data Security should be enabled in order to use Vulnerability Assessment.

  • 400 DatabaseVulnerabilityAssessmentMissingStorageContainerPath - Storage container path must be provided if it isn't set in server level policy

  • 400 VulnerabilityAssessmentDatawarehouseDatabaseIsDeactivated - Could not execute Vulnerability Assessment operation because the database is paused. Please resume it.

  • 400 VulnerabilityAssessmentStorageOutboundFirewallNotAllowed - The storage account is not in the list of Outbound Firewall Rules.

  • 404 SubscriptionDoesNotHaveServer - The requested server was not found

  • 404 SourceDatabaseNotFound - The source database does not exist.

  • 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.

  • 404 OperationIdNotFound - The operation with Id does not exist.

  • 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - Vulnerability Assessment scan is already in progress.

  • 409 OperationCancelled - The operation has been cancelled by user.

  • 409 OperationInterrupted - The operation on the resource could not be completed because it was interrupted by another operation on the same resource.

  • 429 SubscriptionTooManyCreateUpdateRequests - Requests beyond max requests that can be processed by available resources.

  • 429 SubscriptionTooManyRequests - Requests beyond max requests that can be processed by available resources.

  • 500 DatabaseIsUnavailable - Loading failed. Please try again later.

  • 500 OperationTimedOut - The operation timed out and automatically rolled back. Please retry the operation.

  • 503 TooManyRequests - Requests beyond max requests that can be processed by available resources.

Examples

Executes a database's vulnerability assessment scan.

Sample request

POST https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4711/providers/Microsoft.Sql/managedInstances/vulnerabilityassessmenttest-6411/databases/testdb/vulnerabilityAssessments/default/scans/scan01/initiateScan?api-version=2021-11-01

Sample response

Definitions

VulnerabilityAssessmentName

The name of the vulnerability assessment.

Name Type Description
default

string