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

Custom Assessment Automations - Create

创建自定义评估自动化
为提供的订阅创建或更新自定义评估自动化。 请注意,提供现有的自定义评估自动化将替换现有记录。

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Security/customAssessmentAutomations/{customAssessmentAutomationName}?api-version=2021-07-01-preview

URI 参数

名称 必需 类型 说明
customAssessmentAutomationName
path True

string

自定义评估自动化的名称。

resourceGroupName
path True

string

minLength: 1
maxLength: 90
pattern: ^[-\w\._\(\)]+$

用户订阅中的资源组的名称。 名称不区分大小写。

subscriptionId
path True

string

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

Azure 订阅 ID

api-version
query True

string

操作的 API 版本

请求正文

名称 类型 说明
properties.compressedQuery

string

Base 64 编码的 KQL 查询,表示所需的评估自动化结果。

properties.description

string

与此评估自动化生成的评估相关的说明。

properties.displayName

string

此评估自动化生成的评估的显示名称。

properties.remediationDescription

string

与此评估自动化生成的评估相关的修正说明。

properties.severity

severityEnum

与此评估自动化生成的评估相关的严重性。

properties.supportedCloud

supportedCloudEnum

自定义评估自动化的相关云。

响应

名称 类型 说明
200 OK

customAssessmentAutomation

确定 - 已更新

201 Created

customAssessmentAutomation

创建

Other Status Codes

CloudError

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

安全性

azure_auth

Azure Active Directory OAuth2 Flow

类型: oauth2
流向: implicit
授权 URL: https://login.microsoftonline.com/common/oauth2/authorize

作用域

名称 说明
user_impersonation 模拟用户帐户

示例

Create a Custom Assessment Automation

示例请求

PUT https://management.azure.com/subscriptions/e5d1b86c-3051-44d5-8802-aa65d45a279b/resourcegroups/TestResourceGroup/providers/Microsoft.Security/customAssessmentAutomations/MyCustomAssessmentAutomation?api-version=2021-07-01-preview

{
  "properties": {
    "compressedQuery": "DQAKAEkAYQBtAF8ARwByAG8AdQBwAA0ACgB8ACAAZQB4AHQAZQBuAGQAIABIAGUAYQBsAHQAaABTAHQAYQB0AHUAcwAgAD0AIABpAGYAZgAoAHQAbwBzAHQAcgBpAG4AZwAoAFIAZQBjAG8AcgBkAC4AVQBzAGUAcgBOAGEAbQBlACkAIABjAG8AbgB0AGEAaQBuAHMAIAAnAHUAcwBlAHIAJwAsACAAJwBVAE4ASABFAEEATABUAEgAWQAnACwAIAAnAEgARQBBAEwAVABIAFkAJwApAA0ACgA=",
    "supportedCloud": "AWS",
    "severity": "Medium",
    "displayName": "Password Policy",
    "description": "Data should be encrypted",
    "remediationDescription": "Encrypt store by..."
  }
}

示例响应

{
  "id": "/subscriptions/e5d1b86c-3051-44d5-8802-aa65d45a279b/resourcegroups/TestResourceGroup/providers/Microsoft.Security/customAssessmentAutomations/33e7cc6e-a139-4723-a0e5-76993aee0771",
  "name": "33e7cc6e-a139-4723-a0e5-76993aee0771",
  "type": "Microsoft.Security/customAssessmentAutomations",
  "systemData": {
    "createdBy": "user@contoso.com",
    "createdByType": "User",
    "createdAt": "2021-08-31T13:47:50.328Z",
    "lastModifiedBy": "user@contoso.com",
    "lastModifiedByType": "User",
    "lastModifiedAt": "2021-08-31T13:47:50.328Z"
  },
  "properties": {
    "compressedQuery": "DQAKAEkAYQBtAF8ARwByAG8AdQBwAA0ACgB8ACAAZQB4AHQAZQBuAGQAIABIAGUAYQBsAHQAaABTAHQAYQB0AHUAcwAgAD0AIABpAGYAZgAoAHQAbwBzAHQAcgBpAG4AZwAoAFIAZQBjAG8AcgBkAC4AVQBzAGUAcgBOAGEAbQBlACkAIABjAG8AbgB0AGEAaQBuAHMAIAAnAHUAcwBlAHIAJwAsACAAJwBVAE4ASABFAEEATABUAEgAWQAnACwAIAAnAEgARQBBAEwAVABIAFkAJwApAA0ACgA=",
    "supportedCloud": "AWS",
    "severity": "Medium",
    "displayName": "Password Policy",
    "description": "organization passwords policy",
    "remediationDescription": "Change password policy to...",
    "assessmentKey": "d5f442f7-7e77-4bcf-a450-a9c1b9a94eeb"
  }
}
{
  "id": "/subscriptions/e5d1b86c-3051-44d5-8802-aa65d45a279b/resourcegroups/TestResourceGroup/providers/Microsoft.Security/customAssessmentAutomations/33e7cc6e-a139-4723-a0e5-76993aee0771",
  "name": "33e7cc6e-a139-4723-a0e5-76993aee0771",
  "type": "Microsoft.Security/customAssessmentAutomations",
  "systemData": {
    "createdBy": "user@contoso.com",
    "createdByType": "User",
    "createdAt": "2021-08-31T13:01:50.328Z",
    "lastModifiedBy": "user@contoso.com",
    "lastModifiedByType": "User",
    "lastModifiedAt": "2021-08-31T13:01:50.328Z"
  },
  "properties": {
    "compressedQuery": "DQAKAEkAYQBtAF8AUABhAHMAcwB3AG8AcgBkAFAAbwBsAGkAYwB5ACAADQAKAHwAIABlAHgAdABlAG4AZAAgAEgAZQBhAGwAdABoAFMAdABhAHQAdQBzACAAPQAgAGkAZgBmACgAdABvAGkAbgB0ACgAUgBlAGMAbwByAGQALgBNAGkAbgBpAG0AdQBtAFAAYQBzAHMAdwBvAHIAZABMAGUAbgBnAHQAaAApACAAPAAgADgALAAgACcAVQBOAEgARQBBAEwAVABIAFkAJwAsACAAJwBIAEUAQQBMAFQASABZACcAKQANAAoA",
    "supportedCloud": "AWS",
    "severity": "Medium",
    "displayName": "Customized Encryption Rules",
    "description": "Data should be encrypted",
    "remediationDescription": "Encrypt store by...",
    "assessmentKey": "fc1dbcd0-502c-4eab-9312-4014cfc8ea56"
  }
}

定义

名称 说明
CloudError

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

CloudErrorBody

错误详细信息。

createdByType

创建资源的标识的类型。

customAssessmentAutomation

自定义评估自动化

customAssessmentAutomationRequest

自定义评估自动化请求

ErrorAdditionalInfo

资源管理错误附加信息。

severityEnum

与此评估自动化生成的评估相关的严重性。

supportedCloudEnum

自定义评估自动化的相关云。

systemData

与创建和上次修改资源相关的元数据。

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

错误目标。

createdByType

创建资源的标识的类型。

说明
Application
Key
ManagedIdentity
User

customAssessmentAutomation

自定义评估自动化

名称 类型 说明
id

string

资源 ID

name

string

资源名称

properties.assessmentKey

string

为此评估自动化生成评估时使用的评估元数据密钥。

properties.compressedQuery

string

GZip 编码的 KQL 查询,表示所需的评估自动化结果。

properties.description

string

与此评估自动化生成的评估相关的说明。

properties.displayName

string

此评估自动化生成的评估的显示名称。

properties.remediationDescription

string

与此评估自动化生成的评估相关的修正说明。

properties.severity

severityEnum

与此评估自动化生成的评估相关的严重性。

properties.supportedCloud

supportedCloudEnum

自定义评估自动化的相关云。

systemData

systemData

包含 createdBy 和 modifiedBy 信息的 Azure 资源管理器元数据。

type

string

资源类型

customAssessmentAutomationRequest

自定义评估自动化请求

名称 类型 说明
id

string

资源 ID

name

string

资源名称

properties.compressedQuery

string

Base 64 编码的 KQL 查询,表示所需的评估自动化结果。

properties.description

string

与此评估自动化生成的评估相关的说明。

properties.displayName

string

此评估自动化生成的评估的显示名称。

properties.remediationDescription

string

与此评估自动化生成的评估相关的修正说明。

properties.severity

severityEnum

与此评估自动化生成的评估相关的严重性。

properties.supportedCloud

supportedCloudEnum

自定义评估自动化的相关云。

type

string

资源类型

ErrorAdditionalInfo

资源管理错误附加信息。

名称 类型 说明
info

object

其他信息。

type

string

其他信息类型。

severityEnum

与此评估自动化生成的评估相关的严重性。

说明
High
Low
Medium

supportedCloudEnum

自定义评估自动化的相关云。

说明
AWS
GCP

systemData

与创建和上次修改资源相关的元数据。

名称 类型 说明
createdAt

string (date-time)

资源创建时间戳(UTC)。

createdBy

string

创建资源的标识。

createdByType

createdByType

创建资源的标识的类型。

lastModifiedAt

string (date-time)

上次修改的资源时间戳(UTC)

lastModifiedBy

string

上次修改资源的标识。

lastModifiedByType

createdByType

上次修改资源的标识的类型。