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

S360: Add server security alerts list by server #12302

Merged
merged 8 commits into from
Jan 12, 2021
Merged
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"parameters": {
"subscriptionId": "00000000-1111-2222-3333-444444444444",
"resourceGroupName": "securityalert-4799",
"serverName": "securityalert-6440",
"api-version": "2018-06-01-preview"
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.DBforMariaDB/servers/securityalert-6440/securityAlertPolicies",
"name": "Default",
"type": "Microsoft.DBforMariaDB/servers/securityAlertPolicies",
"properties": {
"state": "Disabled",
"emailAccountAdmins": true,
"emailAddresses": [
"test@microsoft.com;user@microsoft.com"
],
"disabledAlerts": [
"Access_Anomaly"
],
"retentionDays": 0,
"storageEndpoint": "https://mystorage.blob.core.windows.net"
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1412,6 +1412,48 @@
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/securityAlertPolicies": {
"get": {
"tags": [
"ServerSecurityAlertPolicies"
],
"description": "Get the server's threat detection policies.",
"operationId": "ServerSecurityAlertPolicies_ListByServer",
"parameters": [
{
"$ref": "#/parameters/ResourceGroupParameter"
},
{
"$ref": "#/parameters/ServerNameParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "Successfully retrieved the server threat detection policies.",
"schema": {
"$ref": "#/definitions/ServerSecurityAlertPolicyListResult"
}
},
"default": {
"description": "*** Error Responses: ***\n\n * 400 SecurityAlertPoliciesInvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 SecurityAlertPoliciesInvalidStorageAccountCredentials - The provided storage account access key is not valid.\n\n * 400 InvalidServerSecurityAlertPolicyCreateRequest - The create server Threat Detection security alert policy 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 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 400 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 409 ServerSecurityAlertPolicyInProgress - Set server security alert policy is already in progress\n\n * 409 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later.\n\n * 500 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 500 GetServerSecurityAlertPolicyFailed - Failed to get Threat Detection settings"
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-examples": {
"List the server's threat detection policies": {
"$ref": "./examples/ServerSecurityAlertsListByServer.json"
}
}
}
},
"/providers/Microsoft.DBForMariaDB/operations": {
"get": {
"tags": [
Expand Down Expand Up @@ -2417,6 +2459,25 @@
},
"description": "An error response from the Batch service."
},
"ServerSecurityAlertPolicyListResult": {
"description": "A list of the server's security alert policies.",
"type": "object",
"properties": {
"value": {
"description": "Array of results.",
"type": "array",
"items": {
"$ref": "#/definitions/ServerSecurityAlertPolicy"
},
"readOnly": true
},
"nextLink": {
"description": "Link to retrieve next page of results.",
"type": "string",
"readOnly": true
}
}
},
"CloudErrorBody": {
"x-ms-external": true,
"properties": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,48 @@
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforMariaDB/servers/{serverName}/securityAlertPolicies": {
"get": {
"tags": [
"ServerSecurityAlertPolicies"
],
"description": "Get the server's threat detection policies.",
"operationId": "ServerSecurityAlertPolicies_ListByServer",
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "#/parameters/ServerNameParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "Successfully retrieved the server threat detection policies.",
"schema": {
"$ref": "#/definitions/ServerSecurityAlertPolicyListResult"
}
},
"default": {
"description": "*** Error Responses: ***\n\n * 400 SecurityAlertPoliciesInvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 SecurityAlertPoliciesInvalidStorageAccountCredentials - The provided storage account access key is not valid.\n\n * 400 InvalidServerSecurityAlertPolicyCreateRequest - The create server Threat Detection security alert policy 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 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 400 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 409 ServerSecurityAlertPolicyInProgress - Set server security alert policy is already in progress\n\n * 409 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later.\n\n * 500 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 500 GetServerSecurityAlertPolicyFailed - Failed to get Threat Detection settings"
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-examples": {
"List the server's threat detection policies": {
"$ref": "./examples/ServerSecurityAlertsListByServer.json"
}
}
}
}
},
"definitions": {
Expand Down Expand Up @@ -205,6 +247,25 @@
"x-ms-client-flatten": true
}
}
},
"ServerSecurityAlertPolicyListResult": {
"description": "A list of the server's security alert policies.",
"type": "object",
"properties": {
"value": {
"description": "Array of results.",
"type": "array",
"items": {
"$ref": "#/definitions/ServerSecurityAlertPolicy"
},
"readOnly": true
},
"nextLink": {
"description": "Link to retrieve next page of results.",
"type": "string",
"readOnly": true
}
}
}
},
"parameters": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"parameters": {
"subscriptionId": "00000000-1111-2222-3333-444444444444",
"resourceGroupName": "securityalert-4799",
"serverName": "securityalert-6440",
"api-version": "2018-06-01"
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.DBforMariaDB/servers/securityalert-6440/securityAlertPolicies",
"name": "Default",
"type": "Microsoft.DBforMariaDB/servers/securityAlertPolicies",
"properties": {
"state": "Disabled",
"emailAccountAdmins": true,
"emailAddresses": [
"test@microsoft.com;user@microsoft.com"
],
"disabledAlerts": [
"Access_Anomaly"
],
"retentionDays": 0,
"storageEndpoint": "https://mystorage.blob.core.windows.net"
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"parameters": {
"subscriptionId": "00000000-1111-2222-3333-444444444444",
"resourceGroupName": "securityalert-4799",
"serverName": "securityalert-6440",
"api-version": "2017-12-01-preview"
},
"responses": {
"200": {
"body": {
"value": [
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/securityalert-4799/providers/Microsoft.DBforMySQL/servers/securityalert-6440/securityAlertPolicies",
"name": "Default",
"type": "Microsoft.DBforMySQL/servers/securityAlertPolicies",
"properties": {
"state": "Disabled",
"emailAccountAdmins": true,
"emailAddresses": [
"test@microsoft.com;user@microsoft.com"
],
"disabledAlerts": [
"Access_Anomaly"
],
"retentionDays": 0,
"storageEndpoint": "https://mystorage.blob.core.windows.net"
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1596,6 +1596,48 @@
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForMySQL/servers/{serverName}/securityAlertPolicies": {
"get": {
"tags": [
"ServerSecurityAlertPolicies"
],
"description": "Get the server's threat detection policies.",
"operationId": "ServerSecurityAlertPolicies_ListByServer",
"parameters": [
{
"$ref": "#/parameters/ResourceGroupParameter"
},
{
"$ref": "#/parameters/ServerNameParameter"
},
{
"$ref": "#/parameters/SubscriptionIdParameter"
},
{
"$ref": "#/parameters/ApiVersionParameter"
}
],
"responses": {
"200": {
"description": "Successfully retrieved the server threat detection policies.",
"schema": {
"$ref": "#/definitions/ServerSecurityAlertPolicyListResult"
}
},
"default": {
"description": "*** Error Responses: ***\n\n * 400 SecurityAlertPoliciesInvalidStorageAccountName - The provided storage account is not valid or does not exist.\n\n * 400 SecurityAlertPoliciesInvalidStorageAccountCredentials - The provided storage account access key is not valid.\n\n * 400 InvalidServerSecurityAlertPolicyCreateRequest - The create server Threat Detection security alert policy 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 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 400 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 404 SubscriptionDoesNotHaveServer - The requested server was not found\n\n * 404 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 409 ServerSecurityAlertPolicyInProgress - Set server security alert policy is already in progress\n\n * 409 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 500 DatabaseIsUnavailable - Loading failed. Please try again later.\n\n * 500 UpsertServerSecurityAlertPolicyFailed - An error has occurred while saving Threat detection settings, please try again later\n\n * 500 GetServerSecurityAlertPolicyFailed - Failed to get Threat Detection settings"
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
},
"x-ms-examples": {
"List the server's threat detection policies": {
"$ref": "./examples/ServerSecurityAlertsListByServer.json"
}
}
}
},
"/providers/Microsoft.DBForMySQL/operations": {
"get": {
"tags": [
Expand Down Expand Up @@ -2750,6 +2792,25 @@
}
}
},
"ServerSecurityAlertPolicyListResult": {
"description": "A list of the server's security alert policies.",
"type": "object",
"properties": {
"value": {
"description": "Array of results.",
"type": "array",
"items": {
"$ref": "#/definitions/ServerSecurityAlertPolicy"
},
"readOnly": true
},
"nextLink": {
"description": "Link to retrieve next page of results.",
"type": "string",
"readOnly": true
}
}
},
"CloudError": {
"x-ms-external": true,
"properties": {
Expand Down
Loading