{ "swagger": "2.0", "info": { "version": "2018-06-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/servers/{serverName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}": { "get": { "tags": [ "ServerVulnerabilityAssessments" ], "description": "Gets the server's vulnerability assessment.", "operationId": "ServerVulnerabilityAssessments_Get", "parameters": [ { "$ref": "#/parameters/ResourceGroupParameter" }, { "name": "serverName", "in": "path", "description": "The name of the server 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 server vulnerability assessment.", "schema": { "$ref": "#/definitions/ServerVulnerabilityAssessment" } }, "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 * 404 SubscriptionDoesNotHaveServer - The requested server was not found" } }, "x-ms-examples": { "Get a server's vulnerability assessment": { "$ref": "./examples/ServerVulnerabilityAssessmentGet.json" } } }, "put": { "tags": [ "ServerVulnerabilityAssessments" ], "description": "Creates or updates the server's vulnerability assessment.", "operationId": "ServerVulnerabilityAssessments_CreateOrUpdate", "parameters": [ { "$ref": "#/parameters/ResourceGroupParameter" }, { "name": "serverName", "in": "path", "description": "The name of the server 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/ServerVulnerabilityAssessment" } }, { "$ref": "#/parameters/SubscriptionIdParameter" }, { "$ref": "#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "Successfully set the vulnerability assessment.", "schema": { "$ref": "#/definitions/ServerVulnerabilityAssessment" } }, "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 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" }, "201": { "description": "Successfully created the vulnerability assessment.", "schema": { "$ref": "#/definitions/ServerVulnerabilityAssessment" } } }, "x-ms-examples": { "Create a server's vulnerability assessment with minimal parameters, when storageContainerSasKey is specified": { "$ref": "./examples/ServerVulnerabilityAssessmentCreateContainerSasKeyMin.json" }, "Create a server's vulnerability assessment with minimal parameters, when storageAccountAccessKey is specified": { "$ref": "./examples/ServerVulnerabilityAssessmentCreateStorageAccessKeyMin.json" }, "Create a server's vulnerability assessment with all parameters": { "$ref": "./examples/ServerVulnerabilityAssessmentCreateMax.json" } } }, "delete": { "tags": [ "ServerVulnerabilityAssessments" ], "description": "Removes the server's vulnerability assessment.", "operationId": "ServerVulnerabilityAssessments_Delete", "parameters": [ { "$ref": "#/parameters/ResourceGroupParameter" }, { "name": "serverName", "in": "path", "description": "The name of the server 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 server 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 * 404 SubscriptionDoesNotHaveServer - The requested server was not found" } }, "x-ms-examples": { "Remove a server's vulnerability assessment": { "$ref": "./examples/ServerVulnerabilityAssessmentDelete.json" } } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/vulnerabilityAssessments": { "get": { "tags": [ "ServerVulnerabilityAssessments" ], "description": "Lists the vulnerability assessment policies associated with a server.", "operationId": "ServerVulnerabilityAssessments_ListByServer", "parameters": [ { "$ref": "#/parameters/ResourceGroupParameter" }, { "$ref": "#/parameters/ServerNameParameter" }, { "$ref": "#/parameters/SubscriptionIdParameter" }, { "$ref": "#/parameters/ApiVersionParameter" } ], "responses": { "200": { "description": "Successfully retrieved the server vulnerability assessment policies.", "schema": { "$ref": "#/definitions/ServerVulnerabilityAssessmentListResult" } }, "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 * 404 SubscriptionDoesNotHaveServer - The requested server was not found" } }, "x-ms-pageable": { "nextLinkName": "nextLink" }, "x-ms-examples": { "Get a server's vulnerability assessment policies": { "$ref": "./examples/ServerVulnerabilityAssessmentListByServer.json" } } } } }, "definitions": { "ServerVulnerabilityAssessmentProperties": { "description": "Properties of a server Vulnerability Assessment.", "required": [ "storageContainerPath" ], "type": "object", "properties": { "storageContainerPath": { "description": "A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/).", "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" } } } }, "ServerVulnerabilityAssessment": { "description": "A server vulnerability assessment.", "type": "object", "allOf": [ { "$ref": "../../../common/v1/types.json#/definitions/ProxyResource" } ], "properties": { "properties": { "$ref": "#/definitions/ServerVulnerabilityAssessmentProperties", "description": "Resource properties.", "x-ms-client-flatten": true } } }, "ServerVulnerabilityAssessmentListResult": { "description": "A list of the server's vulnerability assessments.", "type": "object", "properties": { "value": { "description": "Array of results.", "type": "array", "items": { "$ref": "#/definitions/ServerVulnerabilityAssessment" }, "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" } } } }