{ "swagger": "2.0", "info": { "title": "SqlManagementClient", "version": "2025-01-01", "description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities.", "x-typespec-generated": [ { "emitter": "@azure-tools/typespec-autorest" } ] }, "schemes": [ "https" ], "host": "management.azure.com", "produces": [ "application/json" ], "consumes": [ "application/json" ], "security": [ { "azure_auth": [ "user_impersonation" ] } ], "securityDefinitions": { "azure_auth": { "type": "oauth2", "description": "Azure Active Directory OAuth2 Flow.", "flow": "implicit", "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", "scopes": { "user_impersonation": "impersonate your user account" } } }, "tags": [ { "name": "ManagedInstanceVulnerabilityAssessments" } ], "paths": { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/vulnerabilityAssessments": { "get": { "operationId": "ManagedInstanceVulnerabilityAssessments_ListByInstance", "tags": [ "ManagedInstanceVulnerabilityAssessments" ], "description": "Gets the managed instance's vulnerability assessment policies.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "managedInstanceName", "in": "path", "description": "The name of the managed instance.", "required": true, "type": "string" } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/ManagedInstanceVulnerabilityAssessmentListResult" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Get a managed instance's vulnerability assessment policies": { "$ref": "./examples/ManagedInstanceVulnerabilityAssessmentListByInstance.json" } }, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}": { "get": { "operationId": "ManagedInstanceVulnerabilityAssessments_Get", "tags": [ "ManagedInstanceVulnerabilityAssessments" ], "description": "Gets the managed instance's vulnerability assessment.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "managedInstanceName", "in": "path", "description": "The name of the managed instance.", "required": true, "type": "string" }, { "name": "vulnerabilityAssessmentName", "in": "path", "description": "The name of the vulnerability assessment.", "required": true, "type": "string", "enum": [ "default" ], "x-ms-enum": { "name": "VulnerabilityAssessmentName", "modelAsString": true, "values": [ { "name": "default", "value": "default", "description": "default" } ] } } ], "responses": { "200": { "description": "Azure operation completed successfully.", "schema": { "$ref": "#/definitions/ManagedInstanceVulnerabilityAssessment" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Get a managed instance's vulnerability assessment": { "$ref": "./examples/ManagedInstanceVulnerabilityAssessmentGet.json" } } }, "put": { "operationId": "ManagedInstanceVulnerabilityAssessments_CreateOrUpdate", "tags": [ "ManagedInstanceVulnerabilityAssessments" ], "description": "Creates or updates the managed instance's vulnerability assessment. Learn more about setting SQL vulnerability assessment with managed identity - https://docs.microsoft.com/azure/azure-sql/database/sql-database-vulnerability-assessment-storage", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "managedInstanceName", "in": "path", "description": "The name of the managed instance.", "required": true, "type": "string" }, { "name": "vulnerabilityAssessmentName", "in": "path", "description": "The name of the vulnerability assessment.", "required": true, "type": "string", "enum": [ "default" ], "x-ms-enum": { "name": "VulnerabilityAssessmentName", "modelAsString": true, "values": [ { "name": "default", "value": "default", "description": "default" } ] } }, { "name": "parameters", "in": "body", "description": "The requested resource.", "required": true, "schema": { "$ref": "#/definitions/ManagedInstanceVulnerabilityAssessment" } } ], "responses": { "200": { "description": "Resource 'ManagedInstanceVulnerabilityAssessment' update operation succeeded", "schema": { "$ref": "#/definitions/ManagedInstanceVulnerabilityAssessment" } }, "201": { "description": "Resource 'ManagedInstanceVulnerabilityAssessment' create operation succeeded", "schema": { "$ref": "#/definitions/ManagedInstanceVulnerabilityAssessment" } }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Create a managed instance's vulnerability assessment with all parameters": { "$ref": "./examples/ManagedInstanceVulnerabilityAssessmentCreateMax.json" }, "Create a managed instance's vulnerability assessment with minimal parameters, when storageAccountAccessKey is specified": { "$ref": "./examples/ManagedInstanceVulnerabilityAssessmentCreateStorageAccessKeyMin.json" }, "Create a managed instance's vulnerability assessment with minimal parameters, when storageContainerSasKey is specified": { "$ref": "./examples/ManagedInstanceVulnerabilityAssessmentCreateContainerSasKeyMin.json" } } }, "delete": { "operationId": "ManagedInstanceVulnerabilityAssessments_Delete", "tags": [ "ManagedInstanceVulnerabilityAssessments" ], "description": "Removes the managed instance's vulnerability assessment.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter" }, { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter" }, { "name": "managedInstanceName", "in": "path", "description": "The name of the managed instance.", "required": true, "type": "string" }, { "name": "vulnerabilityAssessmentName", "in": "path", "description": "The name of the vulnerability assessment.", "required": true, "type": "string", "enum": [ "default" ], "x-ms-enum": { "name": "VulnerabilityAssessmentName", "modelAsString": true, "values": [ { "name": "default", "value": "default", "description": "default" } ] } } ], "responses": { "200": { "description": "Resource deleted successfully." }, "default": { "description": "An unexpected error response.", "schema": { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" } } }, "x-ms-examples": { "Remove a managed instance's vulnerability assessment": { "$ref": "./examples/ManagedInstanceVulnerabilityAssessmentDelete.json" } } } } }, "definitions": { "ManagedInstanceVulnerabilityAssessment": { "type": "object", "description": "A managed instance vulnerability assessment.", "properties": { "properties": { "$ref": "#/definitions/ManagedInstanceVulnerabilityAssessmentProperties", "description": "Resource properties.", "x-ms-client-flatten": true } }, "allOf": [ { "$ref": "../../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource" } ] }, "ManagedInstanceVulnerabilityAssessmentListResult": { "type": "object", "description": "The response of a ManagedInstanceVulnerabilityAssessment list operation.", "properties": { "value": { "type": "array", "description": "The ManagedInstanceVulnerabilityAssessment items on this page", "items": { "$ref": "#/definitions/ManagedInstanceVulnerabilityAssessment" } }, "nextLink": { "type": "string", "format": "uri", "description": "The link to the next page of items" } }, "required": [ "value" ] }, "ManagedInstanceVulnerabilityAssessmentProperties": { "type": "object", "description": "Properties of a managed instance vulnerability assessment.", "properties": { "storageContainerPath": { "type": "string", "description": "A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/).", "x-ms-mutability": [ "update", "create" ] }, "storageContainerSasKey": { "type": "string", "description": "A shared access signature (SAS Key) that has write access to the blob container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, StorageContainerSasKey is required. Applies only if the storage account is not behind a Vnet or a firewall", "x-ms-mutability": [ "update", "create" ] }, "storageAccountAccessKey": { "type": "string", "description": "Specifies the identifier key of the storage account for vulnerability assessment scan results. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required. Applies only if the storage account is not behind a Vnet or a firewall", "x-ms-mutability": [ "update", "create" ] }, "recurringScans": { "$ref": "./common.json#/definitions/VulnerabilityAssessmentRecurringScansProperties", "description": "The recurring scans settings" } }, "required": [ "storageContainerPath" ] } }, "parameters": {} }