Skip to content

Commit

Permalink
Add DatabaseVulnerabilityAssessments swagger (#3275)
Browse files Browse the repository at this point in the history
* Add DatabaseVulnerabilityAssessments swagger

The put api is updated.
A new parameter is added to its body properties storageAccountAccessKey.
storageContainerSasKey isn't required anymore, but the user must to specified one of the following parameters:
storageContainerSasKey
or
storageAccountAccessKey

* Add two missing example files

* update databaseVulnerabilityAssessments for version 2017-03

add storageContainerPath to properties as optional parameters

* Revert "update databaseVulnerabilityAssessments for version 2017-03"

This reverts commit 7f90a83.

* Revert "Add DatabaseVulnerabilityAssessments swagger"

This reverts commit 9f34855.

* Revert "Add two missing example files"

This reverts commit 660b2f7.

* Update databaseVulnerabilityAssessments 2017-03-01 swagger

The put api is updated.
A new parameter is added to its body properties storageAccountAccessKey.
storageContainerSasKey isn't required anymore, but the user must to specified one of the following parameters:
storageContainerSasKey
or
storageAccountAccessKey

* Clean non required params in version 10-2017

clean databaseVulnerabilityAssessmentScans

* fix error in execute scan example
  • Loading branch information
ggildin authored and lmazuel committed Jul 27, 2018
1 parent 02bd944 commit 1a1da8d
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,11 @@
"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"
"Create a database's vulnerability assessment with minimal parameters, when storageContainerSasKey is specified": {
"$ref": "./examples/DatabaseVulnerabilityAssessmentCreateSasKeyMin.json"
},
"Create a database's vulnerability assessment with minimal parameters, when storageAccountAccessKey is specified": {
"$ref": "./examples/DatabaseVulnerabilityAssessmentCreateStorageKeyMin.json"
}
}
},
Expand Down Expand Up @@ -212,8 +215,7 @@
"DatabaseVulnerabilityAssessmentProperties": {
"description": "Properties of a database Vulnerability Assessment.",
"required": [
"storageContainerPath",
"storageContainerSasKey"
"storageContainerPath"
],
"type": "object",
"properties": {
Expand All @@ -226,7 +228,15 @@
]
},
"storageContainerSasKey": {
"description": "A shared access signature (SAS Key) that has write access to the blob container specified in 'storageContainerPath' parameter.",
"description": "A shared access signature (SAS Key) that has write access to the blob container specified in 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't specified, StorageContainerSasKey is required.",
"type": "string",
"x-ms-mutability": [
"create",
"update"
]
},
"storageAccountAccessKey": {
"description": "Specifies the identifier key of the auditing storage account. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required.",
"type": "string",
"x-ms-mutability": [
"create",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"properties": {
"storageContainerPath": "https://myStorage.blob.core.windows.net/vulnerability-assessment/",
"storageContainerSasKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"storageAccountAccessKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"recurringScans": {
"isEnabled": true,
"emailSubscriptionAdmins": true,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"parameters": {
"subscriptionId": "00000000-1111-2222-3333-444444444444",
"resourceGroupName": "vulnerabilityaseessmenttest-4799",
"serverName": "vulnerabilityaseessmenttest-6440",
"databaseName": "testdb",
"vulnerabilityAssessmentName": "default",
"api-version": "2017-03-01-preview",
"parameters": {
"properties": {
"storageContainerPath": "https://myStorage.blob.core.windows.net/vulnerability-assessment/",
"storageAccountAccessKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
}
}
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/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": false,
"emails": []
}
}
}
},
"201": {
"body": {
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/vulnerabilityaseessmenttest-4799/providers/Microsoft.Sql/servers/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": false,
"emails": []
}
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -277,36 +277,6 @@
}
},
"definitions": {
"DatabaseVulnerabilityAssessmentProperties": {
"description": "Properties of a database Vulnerability Assessment.",
"required": [
"storageContainerPath",
"storageContainerSasKey"
],
"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",
Expand All @@ -329,22 +299,6 @@
}
}
},
"DatabaseVulnerabilityAssessment": {
"description": "A database vulnerability assessment.",
"type": "object",
"allOf": [
{
"$ref": "../../../common/v1/types.json#/definitions/ProxyResource"
}
],
"properties": {
"properties": {
"$ref": "#/definitions/DatabaseVulnerabilityAssessmentProperties",
"description": "Resource properties.",
"x-ms-client-flatten": true
}
}
},
"VulnerabilityAssessmentScanRecordProperties": {
"description": "Properties of a vulnerability assessment scan record.",
"type": "object",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"parameters": {
"subscriptionId": "00000000-1111-2222-3333-444444444444",
"resourceGroupName": "vulnerabilityassessmenttest-4711",
"managedInstanceName": "vulnerabilityassessmenttest-6411",
"serverName": "vulnerabilityassessmenttest-6440",
"databaseName": "testdb",
"vulnerabilityAssessmentName": "default",
"scanId": "scan01",
Expand Down

0 comments on commit 1a1da8d

Please sign in to comment.