Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DatabaseVulnerabilityAssessments swagger #3275

Merged
merged 9 commits into from
Jul 27, 2018
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",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  •        "create",
    
  •        "update"?
    

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