{ "swagger": "2.0", "info": { "version": "2017-10-01-preview", "title": "SqlManagementClient", "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." }, "host": "management.azure.com", "schemes": [ "https" ], "consumes": [ "application/json" ], "produces": [ "application/json" ], "paths": { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}": { "get": { "tags": [ "ManagedDatabaseVulnerabilityAssessments" ], "description": "Gets the database's vulnerability assessment.", "operationId": "ManagedDatabaseVulnerabilityAssessments_Get", "parameters": [ { "$ref": "#/parameters/ResourceGroupParameter" }, { "name": "managedInstanceName", "in": "path", "description": "The name of the managed instance.", "required": true, "type": "string" }, { "name": "databaseName", "in": "path", "description": "The name of the database for which the vulnerability assessment is defined.", "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 } }, { "$ref": "#/parameters/SubscriptionIdParameter" }, { "$ref": "#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "Successfully retrieved the database vulnerability assessment.", "schema": { "$ref": "#/definitions/DatabaseVulnerabilityAssessment" } }, "default": { "description": "*** Error Responses: ***\n\n * 400 InvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 InvalidStorageAccountCredentials - The provided storage account shared access signature or account storage key is not valid.\n\n * 400 DatabaseVulnerabilityAssessmentMissingStorageContainerPath - Storage container path must be provided if it isn't set in server level policy\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." } }, "x-ms-examples": { "Get a database's vulnerability assessment": { "$ref": "./examples/ManagedDatabaseVulnerabilityAssessmentGet.json" } } }, "put": { "tags": [ "ManagedDatabaseVulnerabilityAssessments" ], "description": "Creates or updates the database's vulnerability assessment.", "operationId": "ManagedDatabaseVulnerabilityAssessments_CreateOrUpdate", "parameters": [ { "$ref": "#/parameters/ResourceGroupParameter" }, { "name": "managedInstanceName", "in": "path", "description": "The name of the managed instance.", "required": true, "type": "string" }, { "name": "databaseName", "in": "path", "description": "The name of the database for which the vulnerability assessment is defined.", "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 } }, { "name": "parameters", "in": "body", "description": "The requested resource.", "required": true, "schema": { "$ref": "#/definitions/DatabaseVulnerabilityAssessment" } }, { "$ref": "#/parameters/SubscriptionIdParameter" }, { "$ref": "#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "Successfully set the vulnerability assessment.", "schema": { "$ref": "#/definitions/DatabaseVulnerabilityAssessment" } }, "default": { "description": "*** Error Responses: ***\n\n * 400 InvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 InvalidStorageAccountCredentials - The provided storage account shared access signature or account storage key is not valid.\n\n * 400 DatabaseVulnerabilityAssessmentMissingStorageContainerPath - Storage container path must be provided if it isn't set in server level policy\n\n * 400 InvalidVulnerabilityAssessmentOperationRequest - The vulnerability assessment operation request does not exist or has no properties object.\n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." }, "201": { "description": "Successfully created the vulnerability assessment.", "schema": { "$ref": "#/definitions/DatabaseVulnerabilityAssessment" } } }, "x-ms-examples": { "Create a database's vulnerability assessment with all parameters": { "$ref": "./examples/ManagedDatabaseVulnerabilityAssessmentCreateMax.json" }, "Create a database's vulnerability assessment with minimal parameters": { "$ref": "./examples/ManagedDatabaseVulnerabilityAssessmentCreateMin.json" } } }, "delete": { "tags": [ "ManagedDatabaseVulnerabilityAssessments" ], "description": "Removes the database's vulnerability assessment.", "operationId": "ManagedDatabaseVulnerabilityAssessments_Delete", "parameters": [ { "$ref": "#/parameters/ResourceGroupParameter" }, { "name": "managedInstanceName", "in": "path", "description": "The name of the managed instance.", "required": true, "type": "string" }, { "name": "databaseName", "in": "path", "description": "The name of the database for which the vulnerability assessment is defined.", "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 } }, { "$ref": "#/parameters/SubscriptionIdParameter" }, { "$ref": "#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "Successfully removed the database vulnerability assessment." }, "default": { "description": "*** Error Responses: ***\n\n * 400 InvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 InvalidStorageAccountCredentials - The provided storage account shared access signature or account storage key is not valid.\n\n * 400 DatabaseVulnerabilityAssessmentMissingStorageContainerPath - Storage container path must be provided if it isn't set in server level policy\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." } }, "x-ms-examples": { "Remove a database's vulnerability assessment": { "$ref": "./examples/ManagedDatabaseVulnerabilityAssessmentDelete.json" } } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments": { "get": { "tags": [ "ManagedDatabaseVulnerabilityAssessments" ], "description": "Lists the vulnerability assessments of a managed database.", "operationId": "ManagedDatabaseVulnerabilityAssessments_ListByDatabase", "parameters": [ { "$ref": "#/parameters/ResourceGroupParameter" }, { "name": "managedInstanceName", "in": "path", "description": "The name of the managed instance.", "required": true, "type": "string" }, { "name": "databaseName", "in": "path", "description": "The name of the database for which the vulnerability assessment is defined.", "required": true, "type": "string" }, { "$ref": "#/parameters/SubscriptionIdParameter" }, { "$ref": "#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "Successfully retrieved the database vulnerability assessments.", "schema": { "$ref": "#/definitions/DatabaseVulnerabilityAssessmentListResult" } }, "default": { "description": "*** Error Responses: ***\n\n * 400 InvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 InvalidStorageAccountCredentials - The provided storage account shared access signature or account storage key is not valid.\n\n * 400 DatabaseVulnerabilityAssessmentMissingStorageContainerPath - Storage container path must be provided if it isn't set in server level policy\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." } }, "x-ms-pageable": { "nextLinkName": "nextLink" }, "x-ms-examples": { "Get a database's vulnerability assessments list": { "$ref": "./examples/ManagedDatabaseVulnerabilityAssessmentListByDatabase.json" } } } } }, "definitions": { "DatabaseVulnerabilityAssessmentProperties": { "description": "Properties of a database Vulnerability Assessment.", "type": "object", "properties": { "storageContainerPath": { "description": "A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). It is required if server level vulnerability assessment policy doesn't set", "type": "string", "x-ms-mutability": [ "create", "update" ] }, "storageContainerSasKey": { "description": "A shared access signature (SAS Key) that has read and write access to the blob container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, StorageContainerSasKey is required.", "type": "string", "x-ms-mutability": [ "create", "update" ] }, "storageAccountAccessKey": { "description": "Specifies the identifier key of the storage account for vulnerability assessment scan results. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required.", "type": "string", "x-ms-mutability": [ "create", "update" ] }, "recurringScans": { "$ref": "#/definitions/VulnerabilityAssessmentRecurringScansProperties", "description": "The recurring scans settings" } } }, "VulnerabilityAssessmentRecurringScansProperties": { "description": "Properties of a Vulnerability Assessment recurring scans.", "type": "object", "properties": { "isEnabled": { "description": "Recurring scans state.", "type": "boolean" }, "emailSubscriptionAdmins": { "description": "Specifies that the schedule scan notification will be is sent to the subscription administrators.", "default": true, "type": "boolean" }, "emails": { "description": "Specifies an array of e-mail addresses to which the scan notification is sent.", "type": "array", "items": { "type": "string" } } } }, "DatabaseVulnerabilityAssessment": { "description": "A database vulnerability assessment.", "type": "object", "allOf": [ { "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" } ], "properties": { "properties": { "$ref": "#/definitions/DatabaseVulnerabilityAssessmentProperties", "description": "Resource properties.", "x-ms-client-flatten": true } } }, "DatabaseVulnerabilityAssessmentListResult": { "description": "A list of the database's vulnerability assessments.", "type": "object", "properties": { "value": { "description": "Array of results.", "type": "array", "items": { "$ref": "#/definitions/DatabaseVulnerabilityAssessment" }, "readOnly": true }, "nextLink": { "description": "Link to retrieve next page of results.", "type": "string", "readOnly": true } } } }, "parameters": { "SubscriptionIdParameter": { "name": "subscriptionId", "in": "path", "description": "The subscription ID that identifies an Azure subscription.", "required": true, "type": "string", "x-ms-parameter-location": "client" }, "ApiVersionParameter": { "name": "api-version", "in": "query", "description": "The API version to use for the request.", "required": true, "type": "string", "x-ms-parameter-location": "client" }, "ResourceGroupParameter": { "name": "resourceGroupName", "in": "path", "description": "The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.", "required": true, "type": "string", "x-ms-parameter-location": "method" }, "ServerNameParameter": { "name": "serverName", "in": "path", "description": "The name of the server.", "required": true, "type": "string", "x-ms-parameter-location": "method" }, "ManagedInstanceNameParameter": { "name": "managedInstanceName", "in": "path", "description": "The name of the managed instance.", "required": true, "type": "string", "x-ms-parameter-location": "method" }, "DatabaseNameParameter": { "name": "databaseName", "in": "path", "description": "The name of the database.", "required": true, "type": "string", "x-ms-parameter-location": "method" }, "BlobAuditingPolicyNameParameter": { "name": "blobAuditingPolicyName", "in": "path", "description": "The name of the blob auditing policy.", "required": true, "type": "string", "enum": [ "default" ], "x-ms-parameter-location": "method" }, "SqlVirtualMachineInstanceNameParameter": { "name": "sqlVirtualMachineInstanceName", "in": "path", "description": "The name of the SqlVirtualMachineInstance.", "required": true, "type": "string", "x-ms-parameter-location": "method" }, "SqlVirtualMachineContainerNameParameter": { "name": "sqlVirtualMachineContainerName", "in": "path", "description": "The name of the SqlVirtualMachineContainer.", "required": true, "type": "string", "x-ms-parameter-location": "method" }, "VirtualClusterNameParameter": { "name": "virtualClusterName", "in": "path", "description": "The name of the virtual cluster.", "required": true, "type": "string", "x-ms-parameter-location": "method" } }, "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" } } } }