你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Security Contacts - Create

为订阅创建安全联系人配置

PUT https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Security/securityContacts/{securityContactName}?api-version=2020-01-01-preview

URI 参数

名称 必需 类型 说明
securityContactName
path True

string

安全联系人对象的名称

subscriptionId
path True

string

Azure 订阅 ID

Regex pattern: ^[0-9A-Fa-f]{8}-([0-9A-Fa-f]{4}-){3}[0-9A-Fa-f]{12}$

api-version
query True

string

操作的 API 版本

请求正文

名称 类型 说明
properties.alertNotifications

AlertNotifications

定义是否发送有关新安全警报电子邮件通知

properties.emails

string

此安全联系人中定义的配置将从 Microsoft Defender for Cloud 接收通知的电子邮件地址列表。

properties.notificationsByRole

NotificationsByRole

定义是否将 Microsoft Defender for Cloud 中的电子邮件通知发送给订阅中具有特定 RBAC 角色的人员。

properties.phone

string

安全联系人的电话号码

响应

名称 类型 说明
200 OK

SecurityContact

确定

201 Created

SecurityContact

创建

Other Status Codes

CloudError

描述操作失败原因的错误响应。

安全性

azure_auth

Azure Active Directory OAuth2 流

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

名称 说明
user_impersonation 模拟用户帐户

示例

Create security contact data

Sample Request

PUT https://management.azure.com/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/securityContacts/default?api-version=2020-01-01-preview

{
  "properties": {
    "notificationsByRole": {
      "state": "On",
      "roles": [
        "Owner"
      ]
    },
    "emails": "john@contoso.com;jane@contoso.com",
    "phone": "(214)275-4038",
    "alertNotifications": {
      "state": "On",
      "minimalSeverity": "Low"
    }
  }
}

Sample Response

{
  "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/securityContacts/default",
  "name": "default",
  "type": "Microsoft.Security/securityContact",
  "properties": {
    "notificationsByRole": {
      "state": "On",
      "roles": [
        "Owner"
      ]
    },
    "emails": "john@microsoft.com;jane@microsoft.com",
    "phone": "(214)275-4038",
    "alertNotifications": {
      "state": "On",
      "minimalSeverity": "Low"
    }
  }
}
{
  "id": "/subscriptions/20ff7fc3-e762-44dd-bd96-b71116dcdc23/providers/Microsoft.Security/securityContacts/default",
  "name": "default",
  "type": "Microsoft.Security/securityContact",
  "properties": {
    "notificationsByRole": {
      "state": "On",
      "roles": [
        "Owner"
      ]
    },
    "emails": "john@microsoft.com;jane@microsoft.com",
    "phone": "(214)275-4038",
    "alertNotifications": {
      "state": "On",
      "minimalSeverity": "Low"
    }
  }
}

定义

名称 说明
AlertNotifications

定义是否发送有关新安全警报电子邮件通知

CloudError

对所有 Azure 资源管理器 API 的常见错误响应,可返回失败操作的错误详细信息。 (这也遵循 OData 错误响应格式.) 。

CloudErrorBody

错误详细信息。

ErrorAdditionalInfo

资源管理错误附加信息。

minimalSeverity

定义将作为电子邮件通知发送的最低警报严重性

NotificationsByRole

定义是否将 Microsoft Defender for Cloud 中的电子邮件通知发送给订阅中具有特定 RBAC 角色的人员。

roles

定义将从 Microsoft Defender for Cloud 获取哪些 RBAC 角色电子邮件通知。 允许的 RBAC 角色列表:

SecurityContact

来自 Microsoft Defender for Cloud 的通知的联系人详细信息和配置。

state

定义是否发送有关新安全警报的电子邮件通知

AlertNotifications

定义是否发送有关新安全警报电子邮件通知

名称 类型 说明
minimalSeverity

minimalSeverity

定义将作为电子邮件通知发送的最低警报严重性

state

state

定义是否发送有关新安全警报的电子邮件通知

CloudError

对所有 Azure 资源管理器 API 的常见错误响应,可返回失败操作的错误详细信息。 (这也遵循 OData 错误响应格式.) 。

名称 类型 说明
error.additionalInfo

ErrorAdditionalInfo[]

错误附加信息。

error.code

string

错误代码。

error.details

CloudErrorBody[]

错误详细信息。

error.message

string

错误消息。

error.target

string

错误目标。

CloudErrorBody

错误详细信息。

名称 类型 说明
additionalInfo

ErrorAdditionalInfo[]

错误附加信息。

code

string

错误代码。

details

CloudErrorBody[]

错误详细信息。

message

string

错误消息。

target

string

错误目标。

ErrorAdditionalInfo

资源管理错误附加信息。

名称 类型 说明
info

object

其他信息。

type

string

其他信息类型。

minimalSeverity

定义将作为电子邮件通知发送的最低警报严重性

名称 类型 说明
High

string

获取有关高严重性的新警报的通知

Low

string

不要收到有关低、中或高严重性的新警报的通知

Medium

string

获取有关具有中等或高严重性的新警报的通知

NotificationsByRole

定义是否将 Microsoft Defender for Cloud 中的电子邮件通知发送给订阅中具有特定 RBAC 角色的人员。

名称 类型 说明
roles

roles[]

定义将从 Microsoft Defender for Cloud 获取哪些 RBAC 角色电子邮件通知。 允许的 RBAC 角色列表:

state

state

定义是否将 AMicrosoft Defender for Cloud 中的电子邮件通知发送给订阅中具有特定 RBAC 角色的人员。

roles

定义将从 Microsoft Defender for Cloud 获取哪些 RBAC 角色电子邮件通知。 允许的 RBAC 角色列表:

名称 类型 说明
AccountAdmin

string

如果启用,请向帐户管理员发送有关新警报的通知

Contributor

string

如果启用,请向订阅参与者发送有关新警报的通知

Owner

string

如果启用,请向订阅所有者发送有关新警报的通知

ServiceAdmin

string

如果启用,请向服务管理员发送有关新警报的通知

SecurityContact

来自 Microsoft Defender for Cloud 的通知的联系人详细信息和配置。

名称 类型 说明
id

string

资源 ID

name

string

资源名称

properties.alertNotifications

AlertNotifications

定义是否发送有关新安全警报电子邮件通知

properties.emails

string

此安全联系人中定义的配置将从 Microsoft Defender for Cloud 接收通知的电子邮件地址列表。

properties.notificationsByRole

NotificationsByRole

定义是否将 Microsoft Defender for Cloud 中的电子邮件通知发送给订阅中具有特定 RBAC 角色的人员。

properties.phone

string

安全联系人的电话号码

type

string

资源类型

state

定义是否发送有关新安全警报的电子邮件通知

名称 类型 说明
Off

string

不要收到有关新警报的通知

On

string

获取有关新警报的通知