-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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 server level policy for vulnerability assessment #3392
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
378 changes: 378 additions & 0 deletions
378
...ger/Microsoft.Sql/preview/2018-06-01-preview/ManagedInstanceVulnerabilityAssessments.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,378 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"version": "2018-06-01-preview", | ||
"title": "SqlManagementClient", | ||
"description": "The Azure SQL Database management API provides a RESTful set of web APIs that interact with Azure SQL Database services to manage your databases. The API enables users to create, retrieve, update, and delete databases, servers, and other entities." | ||
}, | ||
"host": "management.azure.com", | ||
"schemes": [ | ||
"https" | ||
], | ||
"consumes": [ | ||
"application/json" | ||
], | ||
"produces": [ | ||
"application/json" | ||
], | ||
"paths": { | ||
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}": { | ||
"get": { | ||
"tags": [ | ||
"ManagedInstanceVulnerabilityAssessments" | ||
], | ||
"description": "Gets the managed instance's vulnerability assessment.", | ||
"operationId": "ManagedInstanceVulnerabilityAssessments_Get", | ||
"parameters": [ | ||
{ | ||
"$ref": "#/parameters/ResourceGroupParameter" | ||
}, | ||
{ | ||
"name": "managedInstanceName", | ||
"in": "path", | ||
"description": "The name of the managed instance 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 managed instance vulnerability assessment.", | ||
"schema": { | ||
"$ref": "#/definitions/ManagedInstanceVulnerabilityAssessment" | ||
} | ||
}, | ||
"default": { | ||
"description": "*** Error Responses: ***\n\n * 400 InvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 InvalidStorageAccountCredentials - The provided storage account shared access signature or account storage key is not valid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found" | ||
} | ||
}, | ||
"x-ms-examples": { | ||
"Get a server's vulnerability assessment": { | ||
"$ref": "./examples/ManagedInstanceVulnerabilityAssessmentGet.json" | ||
} | ||
} | ||
}, | ||
"put": { | ||
"tags": [ | ||
"ManagedInstanceVulnerabilityAssessments" | ||
], | ||
"description": "Creates or updates the managed instance's vulnerability assessment.", | ||
"operationId": "ManagedInstanceVulnerabilityAssessments_CreateOrUpdate", | ||
"parameters": [ | ||
{ | ||
"$ref": "#/parameters/ResourceGroupParameter" | ||
}, | ||
{ | ||
"name": "managedInstanceName", | ||
"in": "path", | ||
"description": "The name of the managed instance 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/ManagedInstanceVulnerabilityAssessment" | ||
} | ||
}, | ||
{ | ||
"$ref": "#/parameters/SubscriptionIdParameter" | ||
}, | ||
{ | ||
"$ref": "#/parameters/ApiVersionParameter" | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "Successfully set the vulnerability assessment.", | ||
"schema": { | ||
"$ref": "#/definitions/ManagedInstanceVulnerabilityAssessment" | ||
} | ||
}, | ||
"default": { | ||
"description": "*** Error Responses: ***\n\n * 400 InvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 InvalidStorageAccountCredentials - The provided storage account shared access signature or account storage key is not valid.\n\n * 400 InvalidServerVulnerabilityAssessmentOperationRequest - \n\n * 400 DataSecurityInvalidUserSuppliedParameter - An invalid parameter value was provided by the client.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found" | ||
}, | ||
"201": { | ||
"description": "Successfully created the vulnerability assessment.", | ||
"schema": { | ||
"$ref": "#/definitions/ManagedInstanceVulnerabilityAssessment" | ||
} | ||
} | ||
}, | ||
"x-ms-examples": { | ||
"Create a managed instance's vulnerability assessment with all parameters": { | ||
"$ref": "./examples/ManagedInstanceVulnerabilityAssessmentCreateMax.json" | ||
}, | ||
"Create a managed instance's vulnerability assessment with minimal parameters, when storageAccountAccessKey is specified": { | ||
"$ref": "./examples/ManagedInstanceVulnerabilityAssessmentCreateStorageAccessKeyMin.json" | ||
}, | ||
"Create a managed instance's vulnerability assessment with minimal parameters, when storageContainerSasKey is specified": { | ||
"$ref": "./examples/ManagedInstanceVulnerabilityAssessmentCreateContainerSasKeyMin.json" | ||
} | ||
} | ||
}, | ||
"delete": { | ||
"tags": [ | ||
"ManagedInstanceVulnerabilityAssessments" | ||
], | ||
"description": "Removes the managed instance's vulnerability assessment.", | ||
"operationId": "ManagedInstanceVulnerabilityAssessments_Delete", | ||
"parameters": [ | ||
{ | ||
"$ref": "#/parameters/ResourceGroupParameter" | ||
}, | ||
{ | ||
"name": "managedInstanceName", | ||
"in": "path", | ||
"description": "The name of the managed instance 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 managed instance vulnerability assessment." | ||
}, | ||
"default": { | ||
"description": "*** Error Responses: ***\n\n * 400 InvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 InvalidStorageAccountCredentials - The provided storage account shared access signature or account storage key is not valid.\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found" | ||
} | ||
}, | ||
"x-ms-examples": { | ||
"Remove a managed instance's vulnerability assessment": { | ||
"$ref": "./examples/ManagedInstanceVulnerabilityAssessmentDelete.json" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"definitions": { | ||
"ManagedInstanceVulnerabilityAssessmentProperties": { | ||
"description": "Properties of a managed instance Vulnerability Assessment.", | ||
"required": [ | ||
"storageContainerPath" | ||
], | ||
"type": "object", | ||
"properties": { | ||
"storageContainerPath": { | ||
"description": "A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/).", | ||
"type": "string", | ||
"x-ms-mutability": [ | ||
"create", | ||
"update" | ||
] | ||
}, | ||
"storageContainerSasKey": { | ||
"description": "A shared access signature (SAS Key) that has 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 vulnerability assessment storage account. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required.", | ||
"type": "string", | ||
"x-ms-mutability": [ | ||
"create", | ||
"update" | ||
] | ||
}, | ||
"recurringScans": { | ||
"$ref": "#/definitions/VulnerabilityAssessmentRecurringScansProperties", | ||
"description": "The recurring scans settings" | ||
} | ||
} | ||
}, | ||
"VulnerabilityAssessmentRecurringScansProperties": { | ||
"description": "Properties of a Vulnerability Assessment recurring scans.", | ||
"type": "object", | ||
"properties": { | ||
"isEnabled": { | ||
"description": "Recurring scans state.", | ||
"type": "boolean" | ||
}, | ||
"emailSubscriptionAdmins": { | ||
"description": "Specifies that the schedule scan notification will be is sent to the subscription administrators.", | ||
"default": true, | ||
"type": "boolean" | ||
}, | ||
"emails": { | ||
"description": "Specifies an array of e-mail addresses to which the scan notification is sent.", | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
}, | ||
"ManagedInstanceVulnerabilityAssessment": { | ||
"description": "A managed instance vulnerability assessment.", | ||
"type": "object", | ||
"allOf": [ | ||
{ | ||
"$ref": "../../../common/v1/types.json#/definitions/ProxyResource" | ||
} | ||
], | ||
"properties": { | ||
"properties": { | ||
"$ref": "#/definitions/ManagedInstanceVulnerabilityAssessmentProperties", | ||
"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" | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems confusing.
there is no "vulnerability assessment storage account".
Maybe use: "storage account for vulnerability assessment scan results"?