From 7d7490b30d1e21923e69c6773d97e495168a7f9e Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Wed, 26 Oct 2022 10:50:19 +0000 Subject: [PATCH] CodeGen from PR 21206 in Azure/azure-rest-api-specs Merge 2ae26a0bd520295cca9591b8549856f5c6f45181 into 21426cf85836ec17aaa4f20f58324a8666925e34 --- .../Microsoft.Security.json | 153 ++++++++++++++++++ schemas/2021-06-01/Microsoft.Security.json | 139 ++++++++++++++++ 2 files changed, 292 insertions(+) diff --git a/schemas/2020-01-01-preview/Microsoft.Security.json b/schemas/2020-01-01-preview/Microsoft.Security.json index 5319229d9c..314636b438 100644 --- a/schemas/2020-01-01-preview/Microsoft.Security.json +++ b/schemas/2020-01-01-preview/Microsoft.Security.json @@ -43,6 +43,45 @@ "type" ], "description": "Microsoft.Security/connectors" + }, + "securityContacts": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2020-01-01-preview" + ] + }, + "name": { + "type": "string", + "description": "Name of the security contact object" + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/SecurityContactProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Describes security contact properties" + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Security/securityContacts" + ] + } + }, + "required": [ + "apiVersion", + "name", + "properties", + "type" + ], + "description": "Microsoft.Security/securityContacts" } }, "definitions": { @@ -278,6 +317,120 @@ }, "description": "For a non-Azure machine that is not connected directly to the internet, specify a proxy server that the non-Azure machine can use." }, + "SecurityContactProperties": { + "type": "object", + "properties": { + "alertNotifications": { + "oneOf": [ + { + "$ref": "#/definitions/SecurityContactPropertiesAlertNotifications" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Defines whether to send email notifications about new security alerts" + }, + "emails": { + "type": "string", + "description": "List of email addresses which will get notifications from Microsoft Defender for Cloud by the configurations defined in this security contact." + }, + "notificationsByRole": { + "oneOf": [ + { + "$ref": "#/definitions/SecurityContactPropertiesNotificationsByRole" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Defines whether to send email notifications from Microsoft Defender for Cloud to persons with specific RBAC roles on the subscription." + }, + "phone": { + "type": "string", + "description": "The security contact's phone number" + } + }, + "description": "Describes security contact properties" + }, + "SecurityContactPropertiesAlertNotifications": { + "type": "object", + "properties": { + "minimalSeverity": { + "oneOf": [ + { + "type": "string", + "enum": [ + "High", + "Medium", + "Low" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Defines the minimal alert severity which will be sent as email notifications." + }, + "state": { + "oneOf": [ + { + "type": "string", + "enum": [ + "On", + "Off" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Defines if email notifications will be sent about new security alerts." + } + }, + "description": "Defines whether to send email notifications about new security alerts" + }, + "SecurityContactPropertiesNotificationsByRole": { + "type": "object", + "properties": { + "roles": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string", + "enum": [ + "AccountAdmin", + "ServiceAdmin", + "Owner", + "Contributor" + ] + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Defines which RBAC roles will get email notifications from Microsoft Defender for Cloud. List of allowed RBAC roles: " + }, + "state": { + "oneOf": [ + { + "type": "string", + "enum": [ + "On", + "Off" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Defines whether to send email notifications from AMicrosoft Defender for Cloud to persons with specific RBAC roles on the subscription." + } + }, + "description": "Defines whether to send email notifications from Microsoft Defender for Cloud to persons with specific RBAC roles on the subscription." + }, "ServicePrincipalProperties": { "type": "object", "properties": { diff --git a/schemas/2021-06-01/Microsoft.Security.json b/schemas/2021-06-01/Microsoft.Security.json index c178c8051d..295f53aa1a 100644 --- a/schemas/2021-06-01/Microsoft.Security.json +++ b/schemas/2021-06-01/Microsoft.Security.json @@ -43,6 +43,53 @@ "type" ], "description": "Microsoft.Security/assessmentMetadata" + }, + "settings": { + "type": "object", + "oneOf": [ + { + "$ref": "#/definitions/DataExportSettings" + }, + { + "$ref": "#/definitions/AlertSyncSettings" + } + ], + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2021-06-01" + ] + }, + "name": { + "oneOf": [ + { + "type": "string", + "enum": [ + "MCAS", + "WDATP", + "Sentinel" + ] + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The name of the setting." + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.Security/settings" + ] + } + }, + "required": [ + "apiVersion", + "name", + "type" + ], + "description": "Microsoft.Security/settings" } }, "unknown_resourceDefinitions": { @@ -87,6 +134,52 @@ } }, "definitions": { + "AlertSyncSettingProperties": { + "type": "object", + "properties": { + "enabled": { + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Is the alert sync setting enabled" + } + }, + "required": [ + "enabled" + ], + "description": "The alert sync setting properties" + }, + "AlertSyncSettings": { + "type": "object", + "properties": { + "kind": { + "type": "string", + "enum": [ + "AlertSyncSettings" + ] + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/AlertSyncSettingProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The alert sync setting properties" + } + }, + "required": [ + "kind" + ], + "description": "Represents an alert sync setting" + }, "AssessmentLinks": { "type": "object", "properties": {}, @@ -140,6 +233,52 @@ ], "description": "Details of the Azure resource that was assessed" }, + "DataExportSettingProperties": { + "type": "object", + "properties": { + "enabled": { + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Is the data export setting enabled" + } + }, + "required": [ + "enabled" + ], + "description": "The data export setting properties" + }, + "DataExportSettings": { + "type": "object", + "properties": { + "kind": { + "type": "string", + "enum": [ + "DataExportSettings" + ] + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/DataExportSettingProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The data export setting properties" + } + }, + "required": [ + "kind" + ], + "description": "Represents a data export setting" + }, "OnPremiseResourceDetails": { "type": "object", "oneOf": [