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

az security assessment

查看安全评估结果。

命令

名称 说明 类型 Status
az security assessment create

创建客户托管的安全评估。

Core GA
az security assessment delete

删除安全评估。

Core GA
az security assessment list

列出所有安全评估结果。

Core GA
az security assessment show

显示安全评估。

Core GA

az security assessment create

创建客户托管的安全评估。

az security assessment create --name
                              --status-code
                              [--additional-data]
                              [--assessed-resource-id]
                              [--status-cause]
                              [--status-description]

示例

创建安全评估。

az security assessment create -n '4fb6c0a0-1137-42c7-a1c7-4bd37c91de8d' --status-code  'unhealthy'

必需参数

--name -n

要提取的资源的名称。

--status-code

评估结果的编程代码。 可以是“正常”、“不正常”或“NotApplicable”。

可选参数

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--additional-data

附加到评估结果的数据,以便更好地调查或状态清晰。

--assessed-resource-id

此评估的目标资源。

--status-cause

评估结果原因的编程代码。

--status-description

人类可读的评估结果原因说明。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

Output format.

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az security assessment delete

删除安全评估。

az security assessment delete --name
                              [--assessed-resource-id]

示例

删除安全评估。

az security assessment delete -n '4fb6c0a0-1137-42c7-a1c7-4bd37c91de8d'

必需参数

--name -n

要提取的资源的名称。

可选参数

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--assessed-resource-id

此评估的目标资源。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

Output format.

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az security assessment list

列出所有安全评估结果。

az security assessment list

示例

获取安全评估。

az security assessment list
全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

Output format.

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False

az security assessment show

显示安全评估。

az security assessment show --name
                            [--assessed-resource-id]

示例

获取安全评估。

az security assessment show -n '4fb6c0a0-1137-42c7-a1c7-4bd37c91de8d'

必需参数

--name -n

要提取的资源的名称。

可选参数

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--assessed-resource-id

此评估的目标资源。

全局参数
--debug

提高日志记录详细程度以显示所有调试日志。

属性
默认值: False
--help -h

显示此帮助消息并退出。

--only-show-errors

仅显示错误,禁止显示警告。

属性
默认值: False
--output -o

Output format.

属性
默认值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查询字符串。 有关更多信息和示例,请参阅 http://jmespath.org/

--subscription

订阅的名称或 ID。 可以使用 az account set -s NAME_OR_ID 配置默认订阅。

--verbose

增加日志记录详细程度。 使用 --debug 获取完整的调试日志。

属性
默认值: False