From 9830af823bea8316676d9c18256277c84976b3cf Mon Sep 17 00:00:00 2001 From: yaakoviyun Date: Tue, 15 May 2018 08:56:17 +0300 Subject: [PATCH 01/19] Adding Vulnerability Assessment APIs on managed instance Adding Vulnerability Assessment APIs on managed instance --- ...abaseVulnerabilityAssessmentCreateMax.json | 53 ++ ...abaseVulnerabilityAssessmentCreateMin.json | 48 ++ ...DatabaseVulnerabilityAssessmentDelete.json | 14 + ...gedDatabaseVulnerabilityAssessmentGet.json | 27 + ...erabilityAssessmentRuleBaselineCreate.json | 49 ++ ...erabilityAssessmentRuleBaselineDelete.json | 16 + ...ulnerabilityAssessmentRuleBaselineGet.json | 34 ++ ...baseVulnerabilityAssessmentScanExport.json | 34 ++ ...VulnerabilityAssessmentScanRecordsGet.json | 30 + ...tyAssessmentScanRecordsListByDatabase.json | 68 +++ ...seVulnerabilityAssessmentScansExecute.json | 15 + ...abaseVulnerabilityAssessmentBaselines.json | 455 ++++++++++++++ ...dDatabaseVulnerabilityAssessmentScans.json | 573 ++++++++++++++++++ ...nagedDatabaseVulnerabilityAssessments.json | 417 +++++++++++++ specification/sql/resource-manager/readme.md | 12 + 15 files changed, 1845 insertions(+) create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentCreateMax.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentCreateMin.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentDelete.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineCreate.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineDelete.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanExport.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanRecordsGet.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScansExecute.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/managedDatabaseVulnerabilityAssessmentBaselines.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/managedDatabaseVulnerabilityAssessmentScans.json create mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/managedDatabaseVulnerabilityAssessments.json diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentCreateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentCreateMax.json new file mode 100644 index 000000000000..f028be63d685 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentCreateMax.json @@ -0,0 +1,53 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "managedInstanceName": "vulnerabilityaseessmenttest-6440", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "api-version": "2017-10-01-preview", + "parameters": { + "properties": { + "storageContainerPath": "https://myStorage.blob.core.windows.net/vulnerability-assessment/", + "storageContainerSasKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": true, + "emails": [ "email1@mail.com", "email2@mail.com" ] + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments", + "properties": { + "storageContainerPath": "https://myStorage.blob.core.windows.net/vulnerability-assessment/", + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": true, + "emails": [ "email1@mail.com", "email2@mail.com" ] + } + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments", + "properties": { + "storageContainerPath": "https://myStorage.blob.core.windows.net/vulnerability-assessment/", + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": true, + "emails": [ "email1@mail.com", "email2@mail.com" ] + } + } + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentCreateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentCreateMin.json new file mode 100644 index 000000000000..ace54ecf7ca1 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentCreateMin.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "managedInstanceName": "vulnerabilityaseessmenttest-6440", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "api-version": "2017-10-01-preview", + "parameters": { + "properties": { + "storageContainerPath": "https://myStorage.blob.core.windows.net/vulnerability-assessment/", + "storageContainerSasKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments", + "properties": { + "storageContainerPath": "https://myStorage.blob.core.windows.net/vulnerability-assessment/", + "recurringScans": { + "isEnabled": false, + "emailSubscriptionAdmins": false, + "emails": [] + } + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments", + "properties": { + "storageContainerPath": "https://myStorage.blob.core.windows.net/vulnerability-assessment/", + "recurringScans": { + "isEnabled": false, + "emailSubscriptionAdmins": false, + "emails": [] + } + } + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentDelete.json new file mode 100644 index 000000000000..6815fcdb5093 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentDelete.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "managedInstanceName": "vulnerabilityaseessmenttest-6440", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "api-version": "2017-10-01-preview" + }, + "responses": { + "200": { + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentGet.json new file mode 100644 index 000000000000..f88ef60d2c6a --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentGet.json @@ -0,0 +1,27 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "managedInstanceName": "vulnerabilityaseessmenttest-6440", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "api-version": "2017-10-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default", + "name": "default", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments", + "properties": { + "storageContainerPath": "https://myStorage.blob.core.windows.net/vulnerability-assessment/", + "recurringScans": { + "isEnabled": true, + "emailSubscriptionAdmins": true, + "emails": [ "email1@mail.com", "email2@mail.com" ] + } + } + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineCreate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineCreate.json new file mode 100644 index 000000000000..7f22f8124ff4 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineCreate.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "managedInstanceName": "vulnerabilityaseessmenttest-6440", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "ruleId": "VA1001", + "baselineName": "default", + "api-version": "2017-10-01-preview", + "parameters": { + "properties": { + "baselineResults": [ + { + "result": [ "userA", "SELECT" ] + }, + { + "result": [ "userB", "SELECT" ] + }, + { + "result": [ "userC", "SELECT", "tableId_4" ] + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/rules/VA1001/baselines/default", + "name": "default", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/rules/baselines", + "properties": { + "baselineResults": [ + { + "result": [ "userA", "SELECT" ] + }, + { + "result": [ "userB", "SELECT" ] + }, + { + "result": [ "userC", "SELECT", "tableId_4" ] + } + ] + } + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineDelete.json new file mode 100644 index 000000000000..a3397b7e03a8 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineDelete.json @@ -0,0 +1,16 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4799", + "managedInstanceName": "vulnerabilityaseessmenttest-6440", + "databaseName": "testdb", + "baselineName": "default", + "ruleId": "VA1001", + "vulnerabilityAssessmentName": "default", + "api-version": "2017-10-01-preview" + }, + "responses": { + "200": { + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineGet.json new file mode 100644 index 000000000000..503f58a15455 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineGet.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityaseessmenttest-4711", + "managedInstanceName": "vulnerabilityaseessmenttest-6411", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "ruleId": "VA1001", + "baselineName": "default", + "api-version": "2017-10-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/rules/VA1001/baselines/default", + "name": "default", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/rules/baselines", + "properties": { + "baselineResults": [ + { + "result": [ "userA", "SELECT" ] + }, + { + "result": [ "userB", "SELECT" ] + }, + { + "result": [ "userC", "SELECT", "tableId_4" ] + } + ] + } + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanExport.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanExport.json new file mode 100644 index 000000000000..4c6006bc7481 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanExport.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityassessmenttest-4799", + "managedInstanceName": "vulnerabilityassessmenttest-6440", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "scanId": "scan001", + "api-version": "2017-10-01-preview", + "parameters": {} + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityassessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/scans/scan001/export", + "name": "scan001", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans/export", + "properties": { + "exportedReportLocation": "https://myaccount.blob.core.windows.net/vulnerabilityAssessment/vulnerabilityassessmenttest-6440/testdb/scan001.xlsx" + } + } + }, + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityassessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/scans/scan001/export", + "name": "scan001", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans/export", + "properties": { + "exportedReportLocation": "https://myaccount.blob.core.windows.net/vulnerabilityAssessment/vulnerabilityassessmenttest-6440/testdb/scan001.xlsx" + } + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanRecordsGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanRecordsGet.json new file mode 100644 index 000000000000..d4f740690099 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanRecordsGet.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityassessmenttest-4711", + "managedInstanceName": "vulnerabilityassessmenttest-6411", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "scanId": "scan001", + "api-version": "2017-10-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityassessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/scans/scan001", + "name": "scan001", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans", + "properties": { + "scanId": "scan001", + "triggerType": "OnDemand", + "state": "Passed", + "startTime": "2017-12-12T17:45:06Z", + "endTime": "2017-12-12T17:47:06Z", + "errors": [], + "storageContainerPath": "https://myaccount.blob.core.windows.net/vulnerability-assessment", + "numberOfFailedSecurityChecks": 9 + } + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json new file mode 100644 index 000000000000..a2c9cdf21839 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json @@ -0,0 +1,68 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityassessmenttest-4711", + "managedInstanceName": "vulnerabilityassessmenttest-6411", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "api-version": "2017-10-01-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityassessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/scans/scan001", + "name": "scan001", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans", + "properties": { + "scanId": "scan001", + "triggerType": "OnDemand", + "state": "Passed", + "startTime": "2017-12-12T17:45:06Z", + "endTime": "2017-12-12T17:47:06Z", + "errors": [ ], + "storageContainerPath": "https://myaccount.blob.core.windows.net/vulnerability-assessment", + "numberOfFailedSecurityChecks": 9 + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityassessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/scans/scan002", + "name": "scan002", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans", + "properties": { + "scanId": "scan002", + "triggerType": "Recurring", + "state": "Failed", + "startTime": "2017-12-12T17:45:06Z", + "endTime": "2017-12-12T17:47:06Z", + "errors": [ ], + "storageContainerPath": "https://myaccount.blob.core.windows.net/vulnerability-assessment", + "numberOfFailedSecurityChecks": 9 + } + }, + { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityassessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/scans/scan003", + "name": "scan003", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans", + "properties": { + "scanId": "scan003", + "triggerType": "Recurring", + "state": "FailedToRun", + "startTime": "2017-12-12T17:45:06Z", + "endTime": "2017-12-12T17:47:06Z", + "errors": [ + { + "code": "StorageNotFound", + "message": "Storage not found" + } + ], + "storageContainerPath": "https://myaccount.blob.core.windows.net/vulnerability-assessment", + "numberOfFailedSecurityChecks": 0 + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScansExecute.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScansExecute.json new file mode 100644 index 000000000000..2781fc04dd5e --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScansExecute.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityassessmenttest-4711", + "managedInstanceName": "vulnerabilityassessmenttest-6411", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "scanId": "scan01", + "api-version": "2017-10-01-preview" + }, + "responses": { + "200": {}, + "202": {} + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/managedDatabaseVulnerabilityAssessmentBaselines.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/managedDatabaseVulnerabilityAssessmentBaselines.json new file mode 100644 index 000000000000..5692a8275e12 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/managedDatabaseVulnerabilityAssessmentBaselines.json @@ -0,0 +1,455 @@ +{ + "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}/rules/{ruleId}/baselines/{baselineName}": { + "get": { + "tags": [ + "ManagedDatabaseVulnerabilityAssesmentRuleBaselines" + ], + "description": "Gets a database's vulnerability assessment rule baseline.", + "operationId": "ManagedDatabaseVulnerabilityAssessmentRuleBaselines_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 rule baseline 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": "ruleId", + "in": "path", + "description": "The vulnerability assessment rule ID.", + "required": true, + "type": "string" + }, + { + "name": "baselineName", + "in": "path", + "description": "The name of the vulnerability assessment rule baseline.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentPolicyBaselineName", + "modelAsString": true + } + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully got the vulnerability assessment rule baseline.", + "schema": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessmentRuleBaseline" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidDatabaseVulnerabilityAssessmentOperationRequest - 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 VulnerabilityAssessmentInvalidStorageAccount - The storage account '{0}' that was defined in the policy is invalid.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 VulnerabilityAssessmentRuleDoesNotExists - Rule '{0}' does not exist.\n\n * 404 VulnerabilityAssessmentBaselineDoesNotExists - Baseline does not exist for rule '{0}'\n\n * 500 VulnerabilityAssessmentStorageAuthenticationFailed - Could not authenticate to storage account '{0}' .\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Gets a database's vulnerability assessment rule baseline.": { + "$ref": "./examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineGet.json" + } + } + }, + "put": { + "tags": [ + "ManagedDatabaseVulnerabilityAssesmentRuleBaselines" + ], + "description": "Creates or updates a database's vulnerability assessment rule baseline.", + "operationId": "ManagedDatabaseVulnerabilityAssessmentRuleBaselines_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 rule baseline 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": "ruleId", + "in": "path", + "description": "The vulnerability assessment rule ID.", + "required": true, + "type": "string" + }, + { + "name": "baselineName", + "in": "path", + "description": "The name of the vulnerability assessment rule baseline.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentPolicyBaselineName", + "modelAsString": true + } + }, + { + "name": "parameters", + "in": "body", + "description": "The requested rule baseline resource.", + "required": true, + "schema": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessmentRuleBaseline" + } + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully set the vulnerability assessment rule baseline.", + "schema": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessmentRuleBaseline" + } + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidDatabaseVulnerabilityAssessmentOperationRequest - 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 VulnerabilityAssessmentInvalidStorageAccount - The storage account '{0}' that was defined in the policy is invalid.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 VulnerabilityAssessmentRuleDoesNotExists - Rule '{0}' does not exist.\n\n * 404 VulnerabilityAssessmentBaselineDoesNotExists - Baseline does not exist for rule '{0}'\n\n * 500 VulnerabilityAssessmentStorageAuthenticationFailed - Could not authenticate to storage account '{0}' .\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Creates or updates a database's vulnerability assessment rule baseline.": { + "$ref": "./examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineCreate.json" + } + } + }, + "delete": { + "tags": [ + "ManagedDatabaseVulnerabilityAssesmentRuleBaselines" + ], + "description": "Removes the database's vulnerability assessment rule baseline.", + "operationId": "ManagedDatabaseVulnerabilityAssessmentRuleBaselines_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 rule baseline 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": "ruleId", + "in": "path", + "description": "The vulnerability assessment rule ID.", + "required": true, + "type": "string" + }, + { + "name": "baselineName", + "in": "path", + "description": "The name of the vulnerability assessment rule baseline.", + "required": true, + "type": "string", + "enum": [ + "default" + ], + "x-ms-enum": { + "name": "VulnerabilityAssessmentPolicyBaselineName", + "modelAsString": true + } + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully removed the database vulnerability assessment rule baseline." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidDatabaseVulnerabilityAssessmentOperationRequest - 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 VulnerabilityAssessmentInvalidStorageAccount - The storage account '{0}' that was defined in the policy is invalid.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 VulnerabilityAssessmentRuleDoesNotExists - Rule '{0}' does not exist.\n\n * 404 VulnerabilityAssessmentBaselineDoesNotExists - Baseline does not exist for rule '{0}'\n\n * 500 VulnerabilityAssessmentStorageAuthenticationFailed - Could not authenticate to storage account '{0}' .\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Removes a database's vulnerability assessment rule baseline.": { + "$ref": "./examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineDelete.json" + } + } + } + } + }, + "definitions": { + "DatabaseVulnerabilityAssessmentRuleBaselineProperties": { + "description": "Properties of a database Vulnerability Assessment rule baseline.", + "required": [ + "baselineResults" + ], + "type": "object", + "properties": { + "baselineResults": { + "description": "The rule baseline result", + "type": "array", + "items": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessmentRuleBaselineItem" + } + } + } + }, + "DatabaseVulnerabilityAssessmentRuleBaselineItem": { + "description": "Properties for an Azure SQL Database Vulnerability Assessment rule baseline's result.", + "required": [ + "result" + ], + "type": "object", + "properties": { + "result": { + "description": "The rule baseline result", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "Resource": { + "description": "ARM resource.", + "type": "object", + "properties": { + "id": { + "description": "Resource ID.", + "type": "string", + "readOnly": true + }, + "name": { + "description": "Resource name.", + "type": "string", + "readOnly": true + }, + "type": { + "description": "Resource type.", + "type": "string", + "readOnly": true + } + }, + "x-ms-azure-resource": true + }, + "ProxyResource": { + "description": "ARM proxy resource.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": {} + }, + "DatabaseVulnerabilityAssessmentRuleBaseline": { + "description": "A database vulnerability assessment rule baseline.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessmentRuleBaselineProperties", + "description": "Resource properties.", + "x-ms-client-flatten": 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" + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/managedDatabaseVulnerabilityAssessmentScans.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/managedDatabaseVulnerabilityAssessmentScans.json new file mode 100644 index 000000000000..f9135247a83f --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/managedDatabaseVulnerabilityAssessmentScans.json @@ -0,0 +1,573 @@ +{ + "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}/scans": { + "get": { + "tags": [ + "ManagedDatabaseVulnerabilityAssessmentScans" + ], + "description": "Lists the vulnerability assessment scans of a database.", + "operationId": "ManagedDatabaseVulnerabilityAssessmentScans_ListByDatabase", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "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 scan records.", + "schema": { + "$ref": "#/definitions/VulnerabilityAssessmentScanRecordListResult" + } + }, + "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 is not valid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - Vulnerability Assessment scan is already in progress.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "Gets the list of a database vulnerability assessment scan records": { + "$ref": "./examples/ManagedDatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}": { + "get": { + "tags": [ + "ManagedDatabaseVulnerabilityAssessmentScans" + ], + "description": "Gets a vulnerability assessment scan record of a database.", + "operationId": "ManagedDatabaseVulnerabilityAssessmentScans_Get", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "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": "scanId", + "in": "path", + "description": "The vulnerability assessment scan Id of the scan to retrieve.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully retrieved the database vulnerability assessment scan record.", + "schema": { + "$ref": "#/definitions/VulnerabilityAssessmentScanRecord" + } + }, + "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 is not valid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - Vulnerability Assessment scan is already in progress.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Gets a database vulnerability assessment scan record by scan ID": { + "$ref": "./examples/ManagedDatabaseVulnerabilityAssessmentScanRecordsGet.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/initiateScan": { + "post": { + "tags": [ + "ManagedDatabaseVulnerabilityAssessmentScansExecute" + ], + "description": "Executes a Vulnerability Assessment database scan.", + "operationId": "ManagedDatabaseVulnerabilityAssessmentScans_InitiateScan", + "parameters": [ + { + "$ref": "#/parameters/ResourceGroupParameter" + }, + { + "name": "managedInstanceName", + "in": "path", + "description": "The name of the managed instance.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/DatabaseNameParameter" + }, + { + "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": "scanId", + "in": "path", + "description": "The vulnerability assessment scan Id of the scan to retrieve.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successfully executed a Vulnerability Assessment database scan." + }, + "default": { + "description": "*** Error Responses: ***\n\n * 400 InvalidDatabaseVulnerabilityAssessmentOperationRequest - 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 * 400 InvalidVulnerabilityAssessmentScanIdLength - The vulnerability assessment scan ID length must be below {0} characters.\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 is not valid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - Vulnerability Assessment scan is already in progress.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + }, + "202": { + "description": "Successfully started a Vulnerability Assessment database scan." + } + }, + "x-ms-long-running-operation": true, + "x-ms-examples": { + "Executes a database's vulnerability assessment scan.": { + "$ref": "./examples/ManagedDatabaseVulnerabilityAssessmentScansExecute.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/export": { + "post": { + "tags": [ + "ManagedDatabaseVulnerabilityAssessmentScansExport" + ], + "description": "Convert an existing scan result to a human readable format. If already exists nothing happens", + "operationId": "ManagedDatabaseVulnerabilityAssessmentScans_Export", + "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 scanned database.", + "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": "scanId", + "in": "path", + "description": "The vulnerability assessment scan Id.", + "required": true, + "type": "string" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Scan result was converted successfully.", + "schema": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessmentScansExport" + } + }, + "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 is not valid.\n\n * 400 InvalidDatabaseVulnerabilityAssessmentOperationRequest - 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 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - Vulnerability Assessment scan is already in progress.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + }, + "201": { + "description": "Scan result was converted successfully.", + "schema": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessmentScansExport" + } + } + }, + "x-ms-examples": { + "Export a database's vulnerability assessment scan results.": { + "$ref": "./examples/ManagedDatabaseVulnerabilityAssessmentScanExport.json" + } + } + } + } + }, + "definitions": { + "VulnerabilityAssessmentScanRecordListResult": { + "description": "A list of vulnerability assessment scan records.", + "type": "object", + "properties": { + "value": { + "description": "Array of results.", + "type": "array", + "items": { + "$ref": "#/definitions/VulnerabilityAssessmentScanRecord" + }, + "readOnly": true + }, + "nextLink": { + "description": "Link to retrieve next page of results.", + "type": "string", + "readOnly": true + } + } + }, + "VulnerabilityAssessmentScanRecordProperties": { + "description": "Properties of a vulnerability assessment scan record.", + "type": "object", + "properties": { + "scanId": { + "description": "The scan ID.", + "type": "string", + "readOnly": true + }, + "triggerType": { + "description": "The scan trigger type.", + "enum": [ + "OnDemand", + "Recurring" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "VulnerabilityAssessmentScanTriggerType", + "modelAsString": true + } + }, + "state": { + "description": "The scan status.", + "enum": [ + "Passed", + "Failed", + "FailedToRun", + "InProgress" + ], + "type": "string", + "readOnly": true, + "x-ms-enum": { + "name": "VulnerabilityAssessmentScanState", + "modelAsString": true + } + }, + "startTime": { + "format": "date-time", + "description": "The scan start time (UTC).", + "type": "string", + "readOnly": true + }, + "endTime": { + "format": "date-time", + "description": "The scan end time (UTC).", + "type": "string", + "readOnly": true + }, + "errors": { + "description": "The scan errors.", + "type": "array", + "items": { + "$ref": "#/definitions/VulnerabilityAssessmentScanError" + }, + "readOnly": true + }, + "storageContainerPath": { + "description": "The scan results storage container path.", + "type": "string", + "readOnly": true + }, + "numberOfFailedSecurityChecks": { + "format": "int32", + "description": "The number of failed security checks.", + "type": "integer", + "readOnly": true + } + } + }, + "VulnerabilityAssessmentScanError": { + "description": "Properties of a vulnerability assessment scan error.", + "type": "object", + "properties": { + "code": { + "description": "The error code.", + "type": "string", + "readOnly": true + }, + "message": { + "description": "The error message.", + "type": "string", + "readOnly": true + } + } + }, + "Resource": { + "description": "ARM resource.", + "type": "object", + "properties": { + "id": { + "description": "Resource ID.", + "type": "string", + "readOnly": true + }, + "name": { + "description": "Resource name.", + "type": "string", + "readOnly": true + }, + "type": { + "description": "Resource type.", + "type": "string", + "readOnly": true + } + }, + "x-ms-azure-resource": true + }, + "ProxyResource": { + "description": "ARM proxy resource.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": {} + }, + "VulnerabilityAssessmentScanRecord": { + "description": "A vulnerability assessment scan record.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/VulnerabilityAssessmentScanRecordProperties", + "description": "Resource properties.", + "x-ms-client-flatten": true + } + } + }, + "DatabaseVulnerabilityAssessmentScanExportProperties": { + "description": "Properties of the export operation's result.", + "type": "object", + "properties": { + "exportedReportLocation": { + "description": "Location of the exported report (e.g. https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx).", + "type": "string", + "readOnly": true + } + } + }, + "DatabaseVulnerabilityAssessmentScansExport": { + "description": "A database Vulnerability Assessment scan export resource.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessmentScanExportProperties", + "description": "Resource properties.", + "x-ms-client-flatten": 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" + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/managedDatabaseVulnerabilityAssessments.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/managedDatabaseVulnerabilityAssessments.json new file mode 100644 index 000000000000..2ca2844ee5d1 --- /dev/null +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/managedDatabaseVulnerabilityAssessments.json @@ -0,0 +1,417 @@ +{ + "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 is not valid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\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 is not valid.\n\n * 400 InvalidDatabaseVulnerabilityAssessmentOperationRequest - 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 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\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 is not valid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." + } + }, + "x-ms-examples": { + "Remove a database's vulnerability assessment": { + "$ref": "./examples/ManagedDatabaseVulnerabilityAssessmentDelete.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/).", + "type": "string", + "x-ms-mutability": [ + "create", + "update" + ] + }, + "storageContainerSasKey": { + "description": "A shared access signature (SAS Key) that has write access to the blob container specified in 'storageContainerPath' parameter.", + "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" + } + } + } + }, + "Resource": { + "description": "ARM resource.", + "type": "object", + "properties": { + "id": { + "description": "Resource ID.", + "type": "string", + "readOnly": true + }, + "name": { + "description": "Resource name.", + "type": "string", + "readOnly": true + }, + "type": { + "description": "Resource type.", + "type": "string", + "readOnly": true + } + }, + "x-ms-azure-resource": true + }, + "ProxyResource": { + "description": "ARM proxy resource.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": {} + }, + "DatabaseVulnerabilityAssessment": { + "description": "A database vulnerability assessment.", + "type": "object", + "allOf": [ + { + "$ref": "#/definitions/ProxyResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/DatabaseVulnerabilityAssessmentProperties", + "description": "Resource properties.", + "x-ms-client-flatten": 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" + } + } + } +} \ No newline at end of file diff --git a/specification/sql/resource-manager/readme.md b/specification/sql/resource-manager/readme.md index 60252431a642..c1d03d4faba0 100644 --- a/specification/sql/resource-manager/readme.md +++ b/specification/sql/resource-manager/readme.md @@ -96,6 +96,9 @@ input-file: - Microsoft.Sql/preview/2017-10-01-preview/databases.json - Microsoft.Sql/preview/2017-10-01-preview/elasticPools.json - Microsoft.Sql/preview/2017-10-01-preview/databaseVulnerabilityAssessmentScans.json +- Microsoft.Sql/preview/2017-10-01-preview/managedDatabaseVulnerabilityAssessmentBaselines.json +- Microsoft.Sql/preview/2017-10-01-preview/managedDatabaseVulnerabilityAssessments.json +- Microsoft.Sql/preview/2017-10-01-preview/managedDatabaseVulnerabilityAssessmentScans.json - Microsoft.Sql/preview/2017-10-01-preview/instanceFailoverGroups.json - Microsoft.Sql/preview/2017-10-01-preview/shortTermRetentionPolicies.json @@ -165,6 +168,9 @@ input-file: - Microsoft.Sql/preview/2017-10-01-preview/cancelOperations.json - Microsoft.Sql/preview/2017-10-01-preview/cancelPoolOperations.json - Microsoft.Sql/preview/2017-10-01-preview/databaseVulnerabilityAssessmentScans.json +- Microsoft.Sql/preview/2017-10-01-preview/managedDatabaseVulnerabilityAssessmentBaselines.json +- Microsoft.Sql/preview/2017-10-01-preview/managedDatabaseVulnerabilityAssessments.json +- Microsoft.Sql/preview/2017-10-01-preview/managedDatabaseVulnerabilityAssessmentScans.json - Microsoft.Sql/preview/2017-10-01-preview/instanceFailoverGroups.json - Microsoft.Sql/preview/2017-10-01-preview/shortTermRetentionPolicies.json @@ -227,6 +233,9 @@ input-file: - Microsoft.Sql/preview/2017-10-01-preview/cancelOperations.json - Microsoft.Sql/preview/2017-10-01-preview/cancelPoolOperations.json - Microsoft.Sql/preview/2017-10-01-preview/databaseVulnerabilityAssessmentScans.json +- Microsoft.Sql/preview/2017-10-01-preview/managedDatabaseVulnerabilityAssessmentBaselines.json +- Microsoft.Sql/preview/2017-10-01-preview/managedDatabaseVulnerabilityAssessments.json +- Microsoft.Sql/preview/2017-10-01-preview/managedDatabaseVulnerabilityAssessmentScans.json - Microsoft.Sql/preview/2017-10-01-preview/instanceFailoverGroups.json - Microsoft.Sql/preview/2017-10-01-preview/shortTermRetentionPolicies.json @@ -384,6 +393,9 @@ input-file: - ./Microsoft.Sql/preview/2017-10-01-preview/cancelOperations.json - ./Microsoft.Sql/preview/2017-10-01-preview/cancelPoolOperations.json - ./Microsoft.Sql/preview/2017-10-01-preview/databaseVulnerabilityAssessmentScans.json + - ./Microsoft.Sql/preview/2017-10-01-preview/managedDatabaseVulnerabilityAssessmentBaselines.json + - ./Microsoft.Sql/preview/2017-10-01-preview/managedDatabaseVulnerabilityAssessments.json + - ./Microsoft.Sql/preview/2017-10-01-preview/managedDatabaseVulnerabilityAssessmentScans.json - ./Microsoft.Sql/preview/2017-10-01-preview/capabilities.json - ./Microsoft.Sql/preview/2017-10-01-preview/databases.json - ./Microsoft.Sql/preview/2017-10-01-preview/elasticPools.json From 4cbeeeb78e2a8bb1ea82bf79e66581b27c6ebd09 Mon Sep 17 00:00:00 2001 From: yaakoviyun Date: Sun, 20 May 2018 20:53:37 +0300 Subject: [PATCH 02/19] fixed scan operation id --- .../databaseVulnerabilityAssessmentScans.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/databaseVulnerabilityAssessmentScans.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/databaseVulnerabilityAssessmentScans.json index 3aa1170b63d1..2a0bcb8f44d3 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/databaseVulnerabilityAssessmentScans.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/databaseVulnerabilityAssessmentScans.json @@ -85,7 +85,7 @@ "DatabaseVulnerabilityAssessmentScans" ], "description": "Executes a Vulnerability Assessment database scan.", - "operationId": "DatabaseVulnerabilityAssessmentScans_Execute", + "operationId": "DatabaseVulnerabilityAssessmentScans_InitiateScan", "parameters": [ { "$ref": "#/parameters/ResourceGroupParameter" From 4e6e533c4a129f804abd3c690b400c6a2cfed8f8 Mon Sep 17 00:00:00 2001 From: yaakoviyun Date: Sun, 20 May 2018 20:59:37 +0300 Subject: [PATCH 03/19] character mismatch fix --- .../databaseVulnerabilityAssessmentScans.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/databaseVulnerabilityAssessmentScans.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/databaseVulnerabilityAssessmentScans.json index 2a0bcb8f44d3..502c6eb0973c 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/databaseVulnerabilityAssessmentScans.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/databaseVulnerabilityAssessmentScans.json @@ -522,7 +522,7 @@ } }, "DatabaseVulnerabilityAssessmentScanExportProperties": { - "description": "Properties of the export operation’s result.", + "description": "Properties of the export operation's result.", "type": "object", "properties": { "exportedReportLocation": { From c9142fe50b17752b634655b7bb24eda3409a46f8 Mon Sep 17 00:00:00 2001 From: yaakoviyun Date: Mon, 21 May 2018 09:06:55 +0300 Subject: [PATCH 04/19] Added needed changes to Swagger and exampels Added needed changes to Swagger https://github.com/Azure/azure-sdk-for-net/pull/4327#pullrequestreview-121254698 --- .../databaseVulnerabilityAssessments.json | 10 +++- ...baseVulnerabilityAssessmentScanExport.json | 56 +++++++++---------- ...VulnerabilityAssessmentScanRecordsGet.json | 50 ++++++++--------- ...tyAssessmentScanRecordsListByDatabase.json | 11 ++-- ...seVulnerabilityAssessmentScansExecute.json | 42 +++++--------- 5 files changed, 80 insertions(+), 89 deletions(-) diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/databaseVulnerabilityAssessments.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/databaseVulnerabilityAssessments.json index 4ed1a5a09edc..137eb2b2dd57 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/databaseVulnerabilityAssessments.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-03-01-preview/databaseVulnerabilityAssessments.json @@ -143,11 +143,11 @@ } }, "x-ms-examples": { - "Create a database's vulnerability assessment with minimal parameters": { - "$ref": "./examples/DatabaseVulnerabilityAssessmentCreateMin.json" - }, "Create a database's vulnerability assessment with all parameters": { "$ref": "./examples/DatabaseVulnerabilityAssessmentCreateMax.json" + }, + "Create a database's vulnerability assessment with minimal parameters": { + "$ref": "./examples/DatabaseVulnerabilityAssessmentCreateMin.json" } } }, @@ -211,6 +211,10 @@ "definitions": { "DatabaseVulnerabilityAssessmentProperties": { "description": "Properties of a database Vulnerability Assessment.", + "required": [ + "storageContainerPath", + "storageContainerSasKey" + ], "type": "object", "properties": { "storageContainerPath": { diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/DatabaseVulnerabilityAssessmentScanExport.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/DatabaseVulnerabilityAssessmentScanExport.json index 4bd4c0e5fce6..5b5ffd4ccb08 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/DatabaseVulnerabilityAssessmentScanExport.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/DatabaseVulnerabilityAssessmentScanExport.json @@ -1,34 +1,34 @@ { - "parameters": { - "subscriptionId": "00000000-1111-2222-3333-444444444444", - "resourceGroupName": "vulnerabilityassessmenttest-4799", + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityassessmenttest-4799", "serverName": "vulnerabilityassessmenttest-6440", - "databaseName": "testdb", - "vulnerabilityAssessmentName": "default", - "vaScanId": "scan001", - "api-version": "2017-10-01-preview", - "parameters": { } + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "scanId": "scan001", + "api-version": "2017-10-01-preview", + "parameters": {} + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/scans/scan001/export", + "name": "scan001", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans/export", + "properties": { + "exportedReportLocation": "https://myaccount.blob.core.windows.net/vulnerabilityAssessment/vulnerabilityassessmenttest-6440/testdb/scan001.xlsx" + } + } }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/scans/scan001/export", - "name": "scan001", - "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans/export", - "properties": { - "exportedReportLocation": "https://myaccount.blob.core.windows.net/vulnerabilityAssessment/vulnerabilityassessmenttest-6440/testdb/scan001.xlsx" - } - } - }, - "201": { - "body": { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/scans/scan001/export", - "name": "scan001", - "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans/export", - "properties": { - "exportedReportLocation": "https://myaccount.blob.core.windows.net/vulnerabilityAssessment/vulnerabilityassessmenttest-6440/testdb/scan001.xlsx" - } - } + "201": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/scans/scan001/export", + "name": "scan001", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans/export", + "properties": { + "exportedReportLocation": "https://myaccount.blob.core.windows.net/vulnerabilityAssessment/vulnerabilityassessmenttest-6440/testdb/scan001.xlsx" } + } } + } } \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/DatabaseVulnerabilityAssessmentScanRecordsGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/DatabaseVulnerabilityAssessmentScanRecordsGet.json index 99de8691b0b8..5f4ea1475233 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/DatabaseVulnerabilityAssessmentScanRecordsGet.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/DatabaseVulnerabilityAssessmentScanRecordsGet.json @@ -1,30 +1,30 @@ { - "parameters": { - "subscriptionId": "00000000-1111-2222-3333-444444444444", - "resourceGroupName": "vulnerabilityassessmenttest-4711", + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityassessmenttest-4711", "serverName": "vulnerabilityassessmenttest-6411", - "databaseName": "testdb", - "vulnerabilityAssessmentName": "default", - "scanId": "scan001", - "api-version": "2017-10-01-preview" - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/scans/scan001", - "name": "scan001", - "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans", - "properties": { - "id": "scan001", - "triggerType": "OnDemand", - "state": "Passed", - "startTime": "2017-12-12T17:45:06Z", - "endTime": "2017-12-12T17:47:06Z", - "errors": [ ], - "storageContainerPath": "https://myaccount.blob.core.windows.net/vulnerability-assessment", - "numberOfFailedSecurityChecks": 9 - } - } + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "scanId": "scan001", + "api-version": "2017-10-01-preview" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/scans/scan001", + "name": "scan001", + "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans", + "properties": { + "scanId": "scan001", + "triggerType": "OnDemand", + "state": "Passed", + "startTime": "2017-12-12T17:45:06Z", + "endTime": "2017-12-12T17:47:06Z", + "errors": [], + "storageContainerPath": "https://myaccount.blob.core.windows.net/vulnerability-assessment", + "numberOfFailedSecurityChecks": 9 } + } } + } } \ No newline at end of file diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/DatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/DatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json index 3cd0c58cfd92..53bf324c67d8 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/DatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/DatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json @@ -16,7 +16,7 @@ "name": "scan001", "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans", "properties": { - "id": "scan001", + "scanId": "scan001", "triggerType": "OnDemand", "state": "Passed", "startTime": "2017-12-12T17:45:06Z", @@ -31,7 +31,7 @@ "name": "scan002", "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans", "properties": { - "id": "scan002", + "scanId": "scan002", "triggerType": "Recurring", "state": "Failed", "startTime": "2017-12-12T17:45:06Z", @@ -46,13 +46,16 @@ "name": "scan003", "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans", "properties": { - "id": "scan003", + "scanId": "scan003", "triggerType": "Recurring", "state": "FailedToRun", "startTime": "2017-12-12T17:45:06Z", "endTime": "2017-12-12T17:47:06Z", "errors": [ - { "code": "StorageNotFound", "message": "Storage not found" } + { + "code": "StorageNotFound", + "message": "Storage not found" + } ], "storageContainerPath": "https://myaccount.blob.core.windows.net/vulnerability-assessment", "numberOfFailedSecurityChecks": 0 diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/DatabaseVulnerabilityAssessmentScansExecute.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/DatabaseVulnerabilityAssessmentScansExecute.json index 64495e67d625..2781fc04dd5e 100644 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/DatabaseVulnerabilityAssessmentScansExecute.json +++ b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/DatabaseVulnerabilityAssessmentScansExecute.json @@ -1,31 +1,15 @@ { - "parameters": { - "subscriptionId": "00000000-1111-2222-3333-444444444444", - "resourceGroupName": "vulnerabilityassessmenttest-4711", - "serverName": "vulnerabilityassessmenttest-6411", - "databaseName": "testdb", - "vulnerabilityAssessmentName": "default", - "scanId": "scan01", - "api-version": "2017-10-01-preview" - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4799/providers/Microsoft.Sql/servers/vulnerabilityassessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/scans/scan001", - "name": "scan001", - "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans", - "properties": { - "id": "scan001", - "triggerType": "OnDemand", - "state": "Passed", - "startTime": "2017-12-12T17:45:06Z", - "endTime": "2017-12-12T17:47:06Z", - "errors": [ ], - "storageContainerPath": "https://myaccount.blob.core.windows.net/vulnerability-assessment", - "numberOfFailedSecurityChecks": 9 - } - } - }, - "202": {} - } + "parameters": { + "subscriptionId": "00000000-1111-2222-3333-444444444444", + "resourceGroupName": "vulnerabilityassessmenttest-4711", + "managedInstanceName": "vulnerabilityassessmenttest-6411", + "databaseName": "testdb", + "vulnerabilityAssessmentName": "default", + "scanId": "scan01", + "api-version": "2017-10-01-preview" + }, + "responses": { + "200": {}, + "202": {} + } } \ No newline at end of file From 38b920f7ee8fff7cabac3ab90f4af07fad215906 Mon Sep 17 00:00:00 2001 From: yaakoviyun Date: Wed, 23 May 2018 08:26:40 +0300 Subject: [PATCH 05/19] Delete managedDatabaseVulnerabilityAssessmentBaselines.json --- ...abaseVulnerabilityAssessmentBaselines.json | 455 ------------------ 1 file changed, 455 deletions(-) delete mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/managedDatabaseVulnerabilityAssessmentBaselines.json diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/managedDatabaseVulnerabilityAssessmentBaselines.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/managedDatabaseVulnerabilityAssessmentBaselines.json deleted file mode 100644 index 5692a8275e12..000000000000 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/managedDatabaseVulnerabilityAssessmentBaselines.json +++ /dev/null @@ -1,455 +0,0 @@ -{ - "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}/rules/{ruleId}/baselines/{baselineName}": { - "get": { - "tags": [ - "ManagedDatabaseVulnerabilityAssesmentRuleBaselines" - ], - "description": "Gets a database's vulnerability assessment rule baseline.", - "operationId": "ManagedDatabaseVulnerabilityAssessmentRuleBaselines_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 rule baseline 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": "ruleId", - "in": "path", - "description": "The vulnerability assessment rule ID.", - "required": true, - "type": "string" - }, - { - "name": "baselineName", - "in": "path", - "description": "The name of the vulnerability assessment rule baseline.", - "required": true, - "type": "string", - "enum": [ - "default" - ], - "x-ms-enum": { - "name": "VulnerabilityAssessmentPolicyBaselineName", - "modelAsString": true - } - }, - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "Successfully got the vulnerability assessment rule baseline.", - "schema": { - "$ref": "#/definitions/DatabaseVulnerabilityAssessmentRuleBaseline" - } - }, - "default": { - "description": "*** Error Responses: ***\n\n * 400 InvalidDatabaseVulnerabilityAssessmentOperationRequest - 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 VulnerabilityAssessmentInvalidStorageAccount - The storage account '{0}' that was defined in the policy is invalid.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 VulnerabilityAssessmentRuleDoesNotExists - Rule '{0}' does not exist.\n\n * 404 VulnerabilityAssessmentBaselineDoesNotExists - Baseline does not exist for rule '{0}'\n\n * 500 VulnerabilityAssessmentStorageAuthenticationFailed - Could not authenticate to storage account '{0}' .\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." - } - }, - "x-ms-examples": { - "Gets a database's vulnerability assessment rule baseline.": { - "$ref": "./examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineGet.json" - } - } - }, - "put": { - "tags": [ - "ManagedDatabaseVulnerabilityAssesmentRuleBaselines" - ], - "description": "Creates or updates a database's vulnerability assessment rule baseline.", - "operationId": "ManagedDatabaseVulnerabilityAssessmentRuleBaselines_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 rule baseline 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": "ruleId", - "in": "path", - "description": "The vulnerability assessment rule ID.", - "required": true, - "type": "string" - }, - { - "name": "baselineName", - "in": "path", - "description": "The name of the vulnerability assessment rule baseline.", - "required": true, - "type": "string", - "enum": [ - "default" - ], - "x-ms-enum": { - "name": "VulnerabilityAssessmentPolicyBaselineName", - "modelAsString": true - } - }, - { - "name": "parameters", - "in": "body", - "description": "The requested rule baseline resource.", - "required": true, - "schema": { - "$ref": "#/definitions/DatabaseVulnerabilityAssessmentRuleBaseline" - } - }, - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "Successfully set the vulnerability assessment rule baseline.", - "schema": { - "$ref": "#/definitions/DatabaseVulnerabilityAssessmentRuleBaseline" - } - }, - "default": { - "description": "*** Error Responses: ***\n\n * 400 InvalidDatabaseVulnerabilityAssessmentOperationRequest - 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 VulnerabilityAssessmentInvalidStorageAccount - The storage account '{0}' that was defined in the policy is invalid.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 VulnerabilityAssessmentRuleDoesNotExists - Rule '{0}' does not exist.\n\n * 404 VulnerabilityAssessmentBaselineDoesNotExists - Baseline does not exist for rule '{0}'\n\n * 500 VulnerabilityAssessmentStorageAuthenticationFailed - Could not authenticate to storage account '{0}' .\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." - } - }, - "x-ms-examples": { - "Creates or updates a database's vulnerability assessment rule baseline.": { - "$ref": "./examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineCreate.json" - } - } - }, - "delete": { - "tags": [ - "ManagedDatabaseVulnerabilityAssesmentRuleBaselines" - ], - "description": "Removes the database's vulnerability assessment rule baseline.", - "operationId": "ManagedDatabaseVulnerabilityAssessmentRuleBaselines_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 rule baseline 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": "ruleId", - "in": "path", - "description": "The vulnerability assessment rule ID.", - "required": true, - "type": "string" - }, - { - "name": "baselineName", - "in": "path", - "description": "The name of the vulnerability assessment rule baseline.", - "required": true, - "type": "string", - "enum": [ - "default" - ], - "x-ms-enum": { - "name": "VulnerabilityAssessmentPolicyBaselineName", - "modelAsString": true - } - }, - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "Successfully removed the database vulnerability assessment rule baseline." - }, - "default": { - "description": "*** Error Responses: ***\n\n * 400 InvalidDatabaseVulnerabilityAssessmentOperationRequest - 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 VulnerabilityAssessmentInvalidStorageAccount - The storage account '{0}' that was defined in the policy is invalid.\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 404 VulnerabilityAssessmentRuleDoesNotExists - Rule '{0}' does not exist.\n\n * 404 VulnerabilityAssessmentBaselineDoesNotExists - Baseline does not exist for rule '{0}'\n\n * 500 VulnerabilityAssessmentStorageAuthenticationFailed - Could not authenticate to storage account '{0}' .\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." - } - }, - "x-ms-examples": { - "Removes a database's vulnerability assessment rule baseline.": { - "$ref": "./examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineDelete.json" - } - } - } - } - }, - "definitions": { - "DatabaseVulnerabilityAssessmentRuleBaselineProperties": { - "description": "Properties of a database Vulnerability Assessment rule baseline.", - "required": [ - "baselineResults" - ], - "type": "object", - "properties": { - "baselineResults": { - "description": "The rule baseline result", - "type": "array", - "items": { - "$ref": "#/definitions/DatabaseVulnerabilityAssessmentRuleBaselineItem" - } - } - } - }, - "DatabaseVulnerabilityAssessmentRuleBaselineItem": { - "description": "Properties for an Azure SQL Database Vulnerability Assessment rule baseline's result.", - "required": [ - "result" - ], - "type": "object", - "properties": { - "result": { - "description": "The rule baseline result", - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "Resource": { - "description": "ARM resource.", - "type": "object", - "properties": { - "id": { - "description": "Resource ID.", - "type": "string", - "readOnly": true - }, - "name": { - "description": "Resource name.", - "type": "string", - "readOnly": true - }, - "type": { - "description": "Resource type.", - "type": "string", - "readOnly": true - } - }, - "x-ms-azure-resource": true - }, - "ProxyResource": { - "description": "ARM proxy resource.", - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/Resource" - } - ], - "properties": {} - }, - "DatabaseVulnerabilityAssessmentRuleBaseline": { - "description": "A database vulnerability assessment rule baseline.", - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/ProxyResource" - } - ], - "properties": { - "properties": { - "$ref": "#/definitions/DatabaseVulnerabilityAssessmentRuleBaselineProperties", - "description": "Resource properties.", - "x-ms-client-flatten": 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" - } - } - } -} \ No newline at end of file From e3caf47ad635efab19eb958378bc0ea5cfd6fe71 Mon Sep 17 00:00:00 2001 From: yaakoviyun Date: Wed, 23 May 2018 08:26:46 +0300 Subject: [PATCH 06/19] Delete managedDatabaseVulnerabilityAssessmentScans.json --- ...dDatabaseVulnerabilityAssessmentScans.json | 573 ------------------ 1 file changed, 573 deletions(-) delete mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/managedDatabaseVulnerabilityAssessmentScans.json diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/managedDatabaseVulnerabilityAssessmentScans.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/managedDatabaseVulnerabilityAssessmentScans.json deleted file mode 100644 index f9135247a83f..000000000000 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/managedDatabaseVulnerabilityAssessmentScans.json +++ /dev/null @@ -1,573 +0,0 @@ -{ - "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}/scans": { - "get": { - "tags": [ - "ManagedDatabaseVulnerabilityAssessmentScans" - ], - "description": "Lists the vulnerability assessment scans of a database.", - "operationId": "ManagedDatabaseVulnerabilityAssessmentScans_ListByDatabase", - "parameters": [ - { - "$ref": "#/parameters/ResourceGroupParameter" - }, - { - "name": "managedInstanceName", - "in": "path", - "description": "The name of the managed instance.", - "required": true, - "type": "string" - }, - { - "$ref": "#/parameters/DatabaseNameParameter" - }, - { - "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 scan records.", - "schema": { - "$ref": "#/definitions/VulnerabilityAssessmentScanRecordListResult" - } - }, - "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 is not valid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - Vulnerability Assessment scan is already in progress.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - }, - "x-ms-examples": { - "Gets the list of a database vulnerability assessment scan records": { - "$ref": "./examples/ManagedDatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json" - } - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}": { - "get": { - "tags": [ - "ManagedDatabaseVulnerabilityAssessmentScans" - ], - "description": "Gets a vulnerability assessment scan record of a database.", - "operationId": "ManagedDatabaseVulnerabilityAssessmentScans_Get", - "parameters": [ - { - "$ref": "#/parameters/ResourceGroupParameter" - }, - { - "name": "managedInstanceName", - "in": "path", - "description": "The name of the managed instance.", - "required": true, - "type": "string" - }, - { - "$ref": "#/parameters/DatabaseNameParameter" - }, - { - "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": "scanId", - "in": "path", - "description": "The vulnerability assessment scan Id of the scan to retrieve.", - "required": true, - "type": "string" - }, - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "Successfully retrieved the database vulnerability assessment scan record.", - "schema": { - "$ref": "#/definitions/VulnerabilityAssessmentScanRecord" - } - }, - "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 is not valid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - Vulnerability Assessment scan is already in progress.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." - } - }, - "x-ms-examples": { - "Gets a database vulnerability assessment scan record by scan ID": { - "$ref": "./examples/ManagedDatabaseVulnerabilityAssessmentScanRecordsGet.json" - } - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/initiateScan": { - "post": { - "tags": [ - "ManagedDatabaseVulnerabilityAssessmentScansExecute" - ], - "description": "Executes a Vulnerability Assessment database scan.", - "operationId": "ManagedDatabaseVulnerabilityAssessmentScans_InitiateScan", - "parameters": [ - { - "$ref": "#/parameters/ResourceGroupParameter" - }, - { - "name": "managedInstanceName", - "in": "path", - "description": "The name of the managed instance.", - "required": true, - "type": "string" - }, - { - "$ref": "#/parameters/DatabaseNameParameter" - }, - { - "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": "scanId", - "in": "path", - "description": "The vulnerability assessment scan Id of the scan to retrieve.", - "required": true, - "type": "string" - }, - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "Successfully executed a Vulnerability Assessment database scan." - }, - "default": { - "description": "*** Error Responses: ***\n\n * 400 InvalidDatabaseVulnerabilityAssessmentOperationRequest - 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 * 400 InvalidVulnerabilityAssessmentScanIdLength - The vulnerability assessment scan ID length must be below {0} characters.\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 is not valid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - Vulnerability Assessment scan is already in progress.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." - }, - "202": { - "description": "Successfully started a Vulnerability Assessment database scan." - } - }, - "x-ms-long-running-operation": true, - "x-ms-examples": { - "Executes a database's vulnerability assessment scan.": { - "$ref": "./examples/ManagedDatabaseVulnerabilityAssessmentScansExecute.json" - } - } - } - }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/export": { - "post": { - "tags": [ - "ManagedDatabaseVulnerabilityAssessmentScansExport" - ], - "description": "Convert an existing scan result to a human readable format. If already exists nothing happens", - "operationId": "ManagedDatabaseVulnerabilityAssessmentScans_Export", - "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 scanned database.", - "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": "scanId", - "in": "path", - "description": "The vulnerability assessment scan Id.", - "required": true, - "type": "string" - }, - { - "$ref": "#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "Scan result was converted successfully.", - "schema": { - "$ref": "#/definitions/DatabaseVulnerabilityAssessmentScansExport" - } - }, - "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 is not valid.\n\n * 400 InvalidDatabaseVulnerabilityAssessmentOperationRequest - 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 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 409 DatabaseVulnerabilityAssessmentScanIsAlreadyInProgress - Vulnerability Assessment scan is already in progress.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." - }, - "201": { - "description": "Scan result was converted successfully.", - "schema": { - "$ref": "#/definitions/DatabaseVulnerabilityAssessmentScansExport" - } - } - }, - "x-ms-examples": { - "Export a database's vulnerability assessment scan results.": { - "$ref": "./examples/ManagedDatabaseVulnerabilityAssessmentScanExport.json" - } - } - } - } - }, - "definitions": { - "VulnerabilityAssessmentScanRecordListResult": { - "description": "A list of vulnerability assessment scan records.", - "type": "object", - "properties": { - "value": { - "description": "Array of results.", - "type": "array", - "items": { - "$ref": "#/definitions/VulnerabilityAssessmentScanRecord" - }, - "readOnly": true - }, - "nextLink": { - "description": "Link to retrieve next page of results.", - "type": "string", - "readOnly": true - } - } - }, - "VulnerabilityAssessmentScanRecordProperties": { - "description": "Properties of a vulnerability assessment scan record.", - "type": "object", - "properties": { - "scanId": { - "description": "The scan ID.", - "type": "string", - "readOnly": true - }, - "triggerType": { - "description": "The scan trigger type.", - "enum": [ - "OnDemand", - "Recurring" - ], - "type": "string", - "readOnly": true, - "x-ms-enum": { - "name": "VulnerabilityAssessmentScanTriggerType", - "modelAsString": true - } - }, - "state": { - "description": "The scan status.", - "enum": [ - "Passed", - "Failed", - "FailedToRun", - "InProgress" - ], - "type": "string", - "readOnly": true, - "x-ms-enum": { - "name": "VulnerabilityAssessmentScanState", - "modelAsString": true - } - }, - "startTime": { - "format": "date-time", - "description": "The scan start time (UTC).", - "type": "string", - "readOnly": true - }, - "endTime": { - "format": "date-time", - "description": "The scan end time (UTC).", - "type": "string", - "readOnly": true - }, - "errors": { - "description": "The scan errors.", - "type": "array", - "items": { - "$ref": "#/definitions/VulnerabilityAssessmentScanError" - }, - "readOnly": true - }, - "storageContainerPath": { - "description": "The scan results storage container path.", - "type": "string", - "readOnly": true - }, - "numberOfFailedSecurityChecks": { - "format": "int32", - "description": "The number of failed security checks.", - "type": "integer", - "readOnly": true - } - } - }, - "VulnerabilityAssessmentScanError": { - "description": "Properties of a vulnerability assessment scan error.", - "type": "object", - "properties": { - "code": { - "description": "The error code.", - "type": "string", - "readOnly": true - }, - "message": { - "description": "The error message.", - "type": "string", - "readOnly": true - } - } - }, - "Resource": { - "description": "ARM resource.", - "type": "object", - "properties": { - "id": { - "description": "Resource ID.", - "type": "string", - "readOnly": true - }, - "name": { - "description": "Resource name.", - "type": "string", - "readOnly": true - }, - "type": { - "description": "Resource type.", - "type": "string", - "readOnly": true - } - }, - "x-ms-azure-resource": true - }, - "ProxyResource": { - "description": "ARM proxy resource.", - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/Resource" - } - ], - "properties": {} - }, - "VulnerabilityAssessmentScanRecord": { - "description": "A vulnerability assessment scan record.", - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/ProxyResource" - } - ], - "properties": { - "properties": { - "$ref": "#/definitions/VulnerabilityAssessmentScanRecordProperties", - "description": "Resource properties.", - "x-ms-client-flatten": true - } - } - }, - "DatabaseVulnerabilityAssessmentScanExportProperties": { - "description": "Properties of the export operation's result.", - "type": "object", - "properties": { - "exportedReportLocation": { - "description": "Location of the exported report (e.g. https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx).", - "type": "string", - "readOnly": true - } - } - }, - "DatabaseVulnerabilityAssessmentScansExport": { - "description": "A database Vulnerability Assessment scan export resource.", - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/ProxyResource" - } - ], - "properties": { - "properties": { - "$ref": "#/definitions/DatabaseVulnerabilityAssessmentScanExportProperties", - "description": "Resource properties.", - "x-ms-client-flatten": 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" - } - } - } -} \ No newline at end of file From c86bab2080aeec7e38f5543907527244adb501d6 Mon Sep 17 00:00:00 2001 From: yaakoviyun Date: Wed, 23 May 2018 08:26:50 +0300 Subject: [PATCH 07/19] Delete managedDatabaseVulnerabilityAssessments.json --- ...nagedDatabaseVulnerabilityAssessments.json | 417 ------------------ 1 file changed, 417 deletions(-) delete mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/managedDatabaseVulnerabilityAssessments.json diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/managedDatabaseVulnerabilityAssessments.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/managedDatabaseVulnerabilityAssessments.json deleted file mode 100644 index 2ca2844ee5d1..000000000000 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/managedDatabaseVulnerabilityAssessments.json +++ /dev/null @@ -1,417 +0,0 @@ -{ - "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 is not valid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\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 is not valid.\n\n * 400 InvalidDatabaseVulnerabilityAssessmentOperationRequest - 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 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\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 is not valid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.\n\n * 404 SourceDatabaseNotFound - The source database does not exist.\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later." - } - }, - "x-ms-examples": { - "Remove a database's vulnerability assessment": { - "$ref": "./examples/ManagedDatabaseVulnerabilityAssessmentDelete.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/).", - "type": "string", - "x-ms-mutability": [ - "create", - "update" - ] - }, - "storageContainerSasKey": { - "description": "A shared access signature (SAS Key) that has write access to the blob container specified in 'storageContainerPath' parameter.", - "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" - } - } - } - }, - "Resource": { - "description": "ARM resource.", - "type": "object", - "properties": { - "id": { - "description": "Resource ID.", - "type": "string", - "readOnly": true - }, - "name": { - "description": "Resource name.", - "type": "string", - "readOnly": true - }, - "type": { - "description": "Resource type.", - "type": "string", - "readOnly": true - } - }, - "x-ms-azure-resource": true - }, - "ProxyResource": { - "description": "ARM proxy resource.", - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/Resource" - } - ], - "properties": {} - }, - "DatabaseVulnerabilityAssessment": { - "description": "A database vulnerability assessment.", - "type": "object", - "allOf": [ - { - "$ref": "#/definitions/ProxyResource" - } - ], - "properties": { - "properties": { - "$ref": "#/definitions/DatabaseVulnerabilityAssessmentProperties", - "description": "Resource properties.", - "x-ms-client-flatten": 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" - } - } - } -} \ No newline at end of file From caaac4a5c70e2917ab6e00f1a7a3f87bd0301db2 Mon Sep 17 00:00:00 2001 From: yaakoviyun Date: Wed, 23 May 2018 08:27:28 +0300 Subject: [PATCH 08/19] Delete ManagedDatabaseVulnerabilityAssessmentCreateMax.json --- ...abaseVulnerabilityAssessmentCreateMax.json | 53 ------------------- 1 file changed, 53 deletions(-) delete mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentCreateMax.json diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentCreateMax.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentCreateMax.json deleted file mode 100644 index f028be63d685..000000000000 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentCreateMax.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "parameters": { - "subscriptionId": "00000000-1111-2222-3333-444444444444", - "resourceGroupName": "vulnerabilityaseessmenttest-4799", - "managedInstanceName": "vulnerabilityaseessmenttest-6440", - "databaseName": "testdb", - "vulnerabilityAssessmentName": "default", - "api-version": "2017-10-01-preview", - "parameters": { - "properties": { - "storageContainerPath": "https://myStorage.blob.core.windows.net/vulnerability-assessment/", - "storageContainerSasKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", - "recurringScans": { - "isEnabled": true, - "emailSubscriptionAdmins": true, - "emails": [ "email1@mail.com", "email2@mail.com" ] - } - } - } - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default", - "name": "default", - "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments", - "properties": { - "storageContainerPath": "https://myStorage.blob.core.windows.net/vulnerability-assessment/", - "recurringScans": { - "isEnabled": true, - "emailSubscriptionAdmins": true, - "emails": [ "email1@mail.com", "email2@mail.com" ] - } - } - } - }, - "201": { - "body": { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default", - "name": "default", - "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments", - "properties": { - "storageContainerPath": "https://myStorage.blob.core.windows.net/vulnerability-assessment/", - "recurringScans": { - "isEnabled": true, - "emailSubscriptionAdmins": true, - "emails": [ "email1@mail.com", "email2@mail.com" ] - } - } - } - } - } -} \ No newline at end of file From 1ebe82b429d147071d1bf707b066ea05c36f1923 Mon Sep 17 00:00:00 2001 From: yaakoviyun Date: Wed, 23 May 2018 08:27:32 +0300 Subject: [PATCH 09/19] Delete ManagedDatabaseVulnerabilityAssessmentCreateMin.json --- ...abaseVulnerabilityAssessmentCreateMin.json | 48 ------------------- 1 file changed, 48 deletions(-) delete mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentCreateMin.json diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentCreateMin.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentCreateMin.json deleted file mode 100644 index ace54ecf7ca1..000000000000 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentCreateMin.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "parameters": { - "subscriptionId": "00000000-1111-2222-3333-444444444444", - "resourceGroupName": "vulnerabilityaseessmenttest-4799", - "managedInstanceName": "vulnerabilityaseessmenttest-6440", - "databaseName": "testdb", - "vulnerabilityAssessmentName": "default", - "api-version": "2017-10-01-preview", - "parameters": { - "properties": { - "storageContainerPath": "https://myStorage.blob.core.windows.net/vulnerability-assessment/", - "storageContainerSasKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" - } - } - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default", - "name": "default", - "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments", - "properties": { - "storageContainerPath": "https://myStorage.blob.core.windows.net/vulnerability-assessment/", - "recurringScans": { - "isEnabled": false, - "emailSubscriptionAdmins": false, - "emails": [] - } - } - } - }, - "201": { - "body": { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default", - "name": "default", - "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments", - "properties": { - "storageContainerPath": "https://myStorage.blob.core.windows.net/vulnerability-assessment/", - "recurringScans": { - "isEnabled": false, - "emailSubscriptionAdmins": false, - "emails": [] - } - } - } - } - } -} \ No newline at end of file From ccce3c2ab693e5f5e09a4ebb5bc22cf3bad41d40 Mon Sep 17 00:00:00 2001 From: yaakoviyun Date: Wed, 23 May 2018 08:27:37 +0300 Subject: [PATCH 10/19] Delete ManagedDatabaseVulnerabilityAssessmentDelete.json --- ...nagedDatabaseVulnerabilityAssessmentDelete.json | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentDelete.json diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentDelete.json deleted file mode 100644 index 6815fcdb5093..000000000000 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentDelete.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "parameters": { - "subscriptionId": "00000000-1111-2222-3333-444444444444", - "resourceGroupName": "vulnerabilityaseessmenttest-4799", - "managedInstanceName": "vulnerabilityaseessmenttest-6440", - "databaseName": "testdb", - "vulnerabilityAssessmentName": "default", - "api-version": "2017-10-01-preview" - }, - "responses": { - "200": { - } - } -} \ No newline at end of file From f1e63205ac752995e7b16f0ad5234327f1b02aac Mon Sep 17 00:00:00 2001 From: yaakoviyun Date: Wed, 23 May 2018 08:27:40 +0300 Subject: [PATCH 11/19] Delete ManagedDatabaseVulnerabilityAssessmentGet.json --- ...gedDatabaseVulnerabilityAssessmentGet.json | 27 ------------------- 1 file changed, 27 deletions(-) delete mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentGet.json diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentGet.json deleted file mode 100644 index f88ef60d2c6a..000000000000 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentGet.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "parameters": { - "subscriptionId": "00000000-1111-2222-3333-444444444444", - "resourceGroupName": "vulnerabilityaseessmenttest-4799", - "managedInstanceName": "vulnerabilityaseessmenttest-6440", - "databaseName": "testdb", - "vulnerabilityAssessmentName": "default", - "api-version": "2017-10-01-preview" - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default", - "name": "default", - "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments", - "properties": { - "storageContainerPath": "https://myStorage.blob.core.windows.net/vulnerability-assessment/", - "recurringScans": { - "isEnabled": true, - "emailSubscriptionAdmins": true, - "emails": [ "email1@mail.com", "email2@mail.com" ] - } - } - } - } - } -} \ No newline at end of file From ffc7251f75132fb265ddc72b36f651cd08ccbb54 Mon Sep 17 00:00:00 2001 From: yaakoviyun Date: Wed, 23 May 2018 08:27:44 +0300 Subject: [PATCH 12/19] Delete ManagedDatabaseVulnerabilityAssessmentRuleBaselineCreate.json --- ...erabilityAssessmentRuleBaselineCreate.json | 49 ------------------- 1 file changed, 49 deletions(-) delete mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineCreate.json diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineCreate.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineCreate.json deleted file mode 100644 index 7f22f8124ff4..000000000000 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineCreate.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "parameters": { - "subscriptionId": "00000000-1111-2222-3333-444444444444", - "resourceGroupName": "vulnerabilityaseessmenttest-4799", - "managedInstanceName": "vulnerabilityaseessmenttest-6440", - "databaseName": "testdb", - "vulnerabilityAssessmentName": "default", - "ruleId": "VA1001", - "baselineName": "default", - "api-version": "2017-10-01-preview", - "parameters": { - "properties": { - "baselineResults": [ - { - "result": [ "userA", "SELECT" ] - }, - { - "result": [ "userB", "SELECT" ] - }, - { - "result": [ "userC", "SELECT", "tableId_4" ] - } - ] - } - } - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/rules/VA1001/baselines/default", - "name": "default", - "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/rules/baselines", - "properties": { - "baselineResults": [ - { - "result": [ "userA", "SELECT" ] - }, - { - "result": [ "userB", "SELECT" ] - }, - { - "result": [ "userC", "SELECT", "tableId_4" ] - } - ] - } - } - } - } -} \ No newline at end of file From 5f8587452611c3f11eb77026c3c6f2b4c569477c Mon Sep 17 00:00:00 2001 From: yaakoviyun Date: Wed, 23 May 2018 08:27:48 +0300 Subject: [PATCH 13/19] Delete ManagedDatabaseVulnerabilityAssessmentRuleBaselineDelete.json --- ...ulnerabilityAssessmentRuleBaselineDelete.json | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineDelete.json diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineDelete.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineDelete.json deleted file mode 100644 index a3397b7e03a8..000000000000 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineDelete.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "parameters": { - "subscriptionId": "00000000-1111-2222-3333-444444444444", - "resourceGroupName": "vulnerabilityaseessmenttest-4799", - "managedInstanceName": "vulnerabilityaseessmenttest-6440", - "databaseName": "testdb", - "baselineName": "default", - "ruleId": "VA1001", - "vulnerabilityAssessmentName": "default", - "api-version": "2017-10-01-preview" - }, - "responses": { - "200": { - } - } -} \ No newline at end of file From fdbca716b4097ac1e1378f749bb2daf2791d1670 Mon Sep 17 00:00:00 2001 From: yaakoviyun Date: Wed, 23 May 2018 08:27:52 +0300 Subject: [PATCH 14/19] Delete ManagedDatabaseVulnerabilityAssessmentRuleBaselineGet.json --- ...ulnerabilityAssessmentRuleBaselineGet.json | 34 ------------------- 1 file changed, 34 deletions(-) delete mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineGet.json diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineGet.json deleted file mode 100644 index 503f58a15455..000000000000 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentRuleBaselineGet.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "parameters": { - "subscriptionId": "00000000-1111-2222-3333-444444444444", - "resourceGroupName": "vulnerabilityaseessmenttest-4711", - "managedInstanceName": "vulnerabilityaseessmenttest-6411", - "databaseName": "testdb", - "vulnerabilityAssessmentName": "default", - "ruleId": "VA1001", - "baselineName": "default", - "api-version": "2017-10-01-preview" - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityaseessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/rules/VA1001/baselines/default", - "name": "default", - "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/rules/baselines", - "properties": { - "baselineResults": [ - { - "result": [ "userA", "SELECT" ] - }, - { - "result": [ "userB", "SELECT" ] - }, - { - "result": [ "userC", "SELECT", "tableId_4" ] - } - ] - } - } - } - } -} \ No newline at end of file From 478f3d65a09c9884b72951dc58523201d627069d Mon Sep 17 00:00:00 2001 From: yaakoviyun Date: Wed, 23 May 2018 08:28:00 +0300 Subject: [PATCH 15/19] Delete ManagedDatabaseVulnerabilityAssessmentScanExport.json --- ...baseVulnerabilityAssessmentScanExport.json | 34 ------------------- 1 file changed, 34 deletions(-) delete mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanExport.json diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanExport.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanExport.json deleted file mode 100644 index 4c6006bc7481..000000000000 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanExport.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "parameters": { - "subscriptionId": "00000000-1111-2222-3333-444444444444", - "resourceGroupName": "vulnerabilityassessmenttest-4799", - "managedInstanceName": "vulnerabilityassessmenttest-6440", - "databaseName": "testdb", - "vulnerabilityAssessmentName": "default", - "scanId": "scan001", - "api-version": "2017-10-01-preview", - "parameters": {} - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityassessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/scans/scan001/export", - "name": "scan001", - "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans/export", - "properties": { - "exportedReportLocation": "https://myaccount.blob.core.windows.net/vulnerabilityAssessment/vulnerabilityassessmenttest-6440/testdb/scan001.xlsx" - } - } - }, - "201": { - "body": { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityassessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/scans/scan001/export", - "name": "scan001", - "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans/export", - "properties": { - "exportedReportLocation": "https://myaccount.blob.core.windows.net/vulnerabilityAssessment/vulnerabilityassessmenttest-6440/testdb/scan001.xlsx" - } - } - } - } -} \ No newline at end of file From 1798f9d4a5aa29a851dfe6eeec164de3d3eefa66 Mon Sep 17 00:00:00 2001 From: yaakoviyun Date: Wed, 23 May 2018 08:28:11 +0300 Subject: [PATCH 16/19] Delete ManagedDatabaseVulnerabilityAssessmentScanRecordsGet.json --- ...VulnerabilityAssessmentScanRecordsGet.json | 30 ------------------- 1 file changed, 30 deletions(-) delete mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanRecordsGet.json diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanRecordsGet.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanRecordsGet.json deleted file mode 100644 index d4f740690099..000000000000 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanRecordsGet.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "parameters": { - "subscriptionId": "00000000-1111-2222-3333-444444444444", - "resourceGroupName": "vulnerabilityassessmenttest-4711", - "managedInstanceName": "vulnerabilityassessmenttest-6411", - "databaseName": "testdb", - "vulnerabilityAssessmentName": "default", - "scanId": "scan001", - "api-version": "2017-10-01-preview" - }, - "responses": { - "200": { - "body": { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityassessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/scans/scan001", - "name": "scan001", - "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans", - "properties": { - "scanId": "scan001", - "triggerType": "OnDemand", - "state": "Passed", - "startTime": "2017-12-12T17:45:06Z", - "endTime": "2017-12-12T17:47:06Z", - "errors": [], - "storageContainerPath": "https://myaccount.blob.core.windows.net/vulnerability-assessment", - "numberOfFailedSecurityChecks": 9 - } - } - } - } -} \ No newline at end of file From 016729bc6d7a79d6d13e6029395713a737c2fe61 Mon Sep 17 00:00:00 2001 From: yaakoviyun Date: Wed, 23 May 2018 08:28:16 +0300 Subject: [PATCH 17/19] Delete ManagedDatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json --- ...tyAssessmentScanRecordsListByDatabase.json | 68 ------------------- 1 file changed, 68 deletions(-) delete mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json deleted file mode 100644 index a2c9cdf21839..000000000000 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScanRecordsListByDatabase.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "parameters": { - "subscriptionId": "00000000-1111-2222-3333-444444444444", - "resourceGroupName": "vulnerabilityassessmenttest-4711", - "managedInstanceName": "vulnerabilityassessmenttest-6411", - "databaseName": "testdb", - "vulnerabilityAssessmentName": "default", - "api-version": "2017-10-01-preview" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityassessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/scans/scan001", - "name": "scan001", - "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans", - "properties": { - "scanId": "scan001", - "triggerType": "OnDemand", - "state": "Passed", - "startTime": "2017-12-12T17:45:06Z", - "endTime": "2017-12-12T17:47:06Z", - "errors": [ ], - "storageContainerPath": "https://myaccount.blob.core.windows.net/vulnerability-assessment", - "numberOfFailedSecurityChecks": 9 - } - }, - { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityassessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/scans/scan002", - "name": "scan002", - "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans", - "properties": { - "scanId": "scan002", - "triggerType": "Recurring", - "state": "Failed", - "startTime": "2017-12-12T17:45:06Z", - "endTime": "2017-12-12T17:47:06Z", - "errors": [ ], - "storageContainerPath": "https://myaccount.blob.core.windows.net/vulnerability-assessment", - "numberOfFailedSecurityChecks": 9 - } - }, - { - "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityassessmenttest-4799/providers/Microsoft.Sql/managedInstances/vulnerabilityassessmenttest-6440/databases/testdb/vulnerabilityAssessments/default/scans/scan003", - "name": "scan003", - "type": "Microsoft.Sql/servers/databases/vulnerabilityAssessments/scans", - "properties": { - "scanId": "scan003", - "triggerType": "Recurring", - "state": "FailedToRun", - "startTime": "2017-12-12T17:45:06Z", - "endTime": "2017-12-12T17:47:06Z", - "errors": [ - { - "code": "StorageNotFound", - "message": "Storage not found" - } - ], - "storageContainerPath": "https://myaccount.blob.core.windows.net/vulnerability-assessment", - "numberOfFailedSecurityChecks": 0 - } - } - ] - } - } - } -} \ No newline at end of file From 501d0f973196b20ebea30808e6db2d5f9b12c8f6 Mon Sep 17 00:00:00 2001 From: yaakoviyun Date: Wed, 23 May 2018 08:28:20 +0300 Subject: [PATCH 18/19] Delete ManagedDatabaseVulnerabilityAssessmentScansExecute.json --- ...tabaseVulnerabilityAssessmentScansExecute.json | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScansExecute.json diff --git a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScansExecute.json b/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScansExecute.json deleted file mode 100644 index 2781fc04dd5e..000000000000 --- a/specification/sql/resource-manager/Microsoft.Sql/preview/2017-10-01-preview/examples/ManagedDatabaseVulnerabilityAssessmentScansExecute.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "parameters": { - "subscriptionId": "00000000-1111-2222-3333-444444444444", - "resourceGroupName": "vulnerabilityassessmenttest-4711", - "managedInstanceName": "vulnerabilityassessmenttest-6411", - "databaseName": "testdb", - "vulnerabilityAssessmentName": "default", - "scanId": "scan01", - "api-version": "2017-10-01-preview" - }, - "responses": { - "200": {}, - "202": {} - } -} \ No newline at end of file From 839446dd054ae837881ba5f11e54779782dde49d Mon Sep 17 00:00:00 2001 From: yaakoviyun Date: Wed, 23 May 2018 08:31:13 +0300 Subject: [PATCH 19/19] Update readme.md --- specification/sql/resource-manager/readme.md | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/specification/sql/resource-manager/readme.md b/specification/sql/resource-manager/readme.md index c1d03d4faba0..60252431a642 100644 --- a/specification/sql/resource-manager/readme.md +++ b/specification/sql/resource-manager/readme.md @@ -96,9 +96,6 @@ input-file: - Microsoft.Sql/preview/2017-10-01-preview/databases.json - Microsoft.Sql/preview/2017-10-01-preview/elasticPools.json - Microsoft.Sql/preview/2017-10-01-preview/databaseVulnerabilityAssessmentScans.json -- Microsoft.Sql/preview/2017-10-01-preview/managedDatabaseVulnerabilityAssessmentBaselines.json -- Microsoft.Sql/preview/2017-10-01-preview/managedDatabaseVulnerabilityAssessments.json -- Microsoft.Sql/preview/2017-10-01-preview/managedDatabaseVulnerabilityAssessmentScans.json - Microsoft.Sql/preview/2017-10-01-preview/instanceFailoverGroups.json - Microsoft.Sql/preview/2017-10-01-preview/shortTermRetentionPolicies.json @@ -168,9 +165,6 @@ input-file: - Microsoft.Sql/preview/2017-10-01-preview/cancelOperations.json - Microsoft.Sql/preview/2017-10-01-preview/cancelPoolOperations.json - Microsoft.Sql/preview/2017-10-01-preview/databaseVulnerabilityAssessmentScans.json -- Microsoft.Sql/preview/2017-10-01-preview/managedDatabaseVulnerabilityAssessmentBaselines.json -- Microsoft.Sql/preview/2017-10-01-preview/managedDatabaseVulnerabilityAssessments.json -- Microsoft.Sql/preview/2017-10-01-preview/managedDatabaseVulnerabilityAssessmentScans.json - Microsoft.Sql/preview/2017-10-01-preview/instanceFailoverGroups.json - Microsoft.Sql/preview/2017-10-01-preview/shortTermRetentionPolicies.json @@ -233,9 +227,6 @@ input-file: - Microsoft.Sql/preview/2017-10-01-preview/cancelOperations.json - Microsoft.Sql/preview/2017-10-01-preview/cancelPoolOperations.json - Microsoft.Sql/preview/2017-10-01-preview/databaseVulnerabilityAssessmentScans.json -- Microsoft.Sql/preview/2017-10-01-preview/managedDatabaseVulnerabilityAssessmentBaselines.json -- Microsoft.Sql/preview/2017-10-01-preview/managedDatabaseVulnerabilityAssessments.json -- Microsoft.Sql/preview/2017-10-01-preview/managedDatabaseVulnerabilityAssessmentScans.json - Microsoft.Sql/preview/2017-10-01-preview/instanceFailoverGroups.json - Microsoft.Sql/preview/2017-10-01-preview/shortTermRetentionPolicies.json @@ -393,9 +384,6 @@ input-file: - ./Microsoft.Sql/preview/2017-10-01-preview/cancelOperations.json - ./Microsoft.Sql/preview/2017-10-01-preview/cancelPoolOperations.json - ./Microsoft.Sql/preview/2017-10-01-preview/databaseVulnerabilityAssessmentScans.json - - ./Microsoft.Sql/preview/2017-10-01-preview/managedDatabaseVulnerabilityAssessmentBaselines.json - - ./Microsoft.Sql/preview/2017-10-01-preview/managedDatabaseVulnerabilityAssessments.json - - ./Microsoft.Sql/preview/2017-10-01-preview/managedDatabaseVulnerabilityAssessmentScans.json - ./Microsoft.Sql/preview/2017-10-01-preview/capabilities.json - ./Microsoft.Sql/preview/2017-10-01-preview/databases.json - ./Microsoft.Sql/preview/2017-10-01-preview/elasticPools.json